how to setup loopback before calling mount_root() .. root=/dev/loop0

how to setup loopback before calling mount_root() .. root=/dev/loop0

Post by Domen Stanga » Fri, 19 Apr 2002 01:30:16



Can anyone please tell me if there is a way to use lo_ioctl before mounting
root.
How to use lo_ioctl in kernel in way like:
losetup /dev/loop0 /dev/hda3 ?
then root=/dev/loop0

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

how to setup loopback before calling mount_root() .. root=/dev/loop0

Post by Andreas Dilge » Fri, 19 Apr 2002 01:50:09



Quote:> Can anyone please tell me if there is a way to use lo_ioctl before mounting
> root.
> How to use lo_ioctl in kernel in way like:
> losetup /dev/loop0 /dev/hda3 ?
> then root=/dev/loop0

Set up an initrd which does this exactly.

Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. new LILO won't set root = (encrypted) /dev/loop0?

I have an encrypted root partition mounted via the loopback facility.  I
boot with an initrd bootfloppy that does the necessary "losetup -e
blowfish /dev/loop0 /dev/hda1", then replaces / with the new rootfs (per
normal  initrd operation).  I saw a similar setup (without encryption)
in the RedHat 6.2 installer, which can use C:\REDHAT.FS and
C:\REDHAT.SWP on a FAT filesystem as Linux root and swap, via the
loopback facility.  Like my setup, RedHat's also requires booting using
an initrd bootfloppy in order to do the "losetup" needed to read  /  .

My setup worked fine when I installed it a couple of years ago, but I'm
having trouble getting LILO v0.21 to install the map and primary boot
loader for a new kernel onto a new initrd floppy.  LILO complains:

    Sorry, don't know how to handle device 0x700

(I have "root=0x700" or "rdev vmlinuz  /dev/loop0"; either seems to
cause this error).
According to LILO help docs, this error means that LILO doesn't
understand the disk geometry of /dev/loop0 (no surprise there).
Setting "linear" in lilo.conf doesn't seem to help.  Stangely, this lilo
config worked just fine with old LILO (before v.20).

Can anyone give pointers on how to get LILO to install a primary boot
loader and map, with a kernel set to use /dev/loop0 as rootfs?  Or any
pointers to the source/instructions for the similar RedHat
loopback'ed-rootfs scheme would be appreciated.

Thanks,
Bradley
carlson at tcfreenet dot org

2. WU-FTPD's ftpshut.

3. HOWTO?:ramdisk root, img loopback etc,dev,bin

4. HELP: Naples Freenet -- Request for Comments

5. MKINITRD: mount: the kernel does not recognize /dev/loop0 as a block device

6. Question: Swap Partition

7. How to increase size od dev/loop0?

8. S3 server: clock value > 80 for 16bpp?

9. mke2fs hangs while running on /dev/loop0 - kernel version 2.4

10. sharing dirs with /dev/loop0, can it be done?

11. Booting from /dev/loop0?

12. [acme@conectiva.com.br: Re: mke2fs /dev/loop0]

13. How increase size of dev/loop0?