[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#772416: initrd: support booting from chroot



Package: initramfs-tools
Version: 0.109.1
Severity: wishlist
Tags: patch

Hi,

Chroots are pretty neat to maintain different systems side by side
without too much hassle, however once in while you need to boot from one
of them and then you're in trouble (no easy way to do it afaik).

I came up with a script to patch wheezy's initrd and add support for a
'chroot=' boot param. Booting is easy then: just set 'chroot' param and
switch to 'rw':

menuentry "Debian Wheezy, (chroot)" {
        insmod ext2
        set root='(hd0,7)'
        set chroot='/chroot/wheezy'
        linux   $chroot/boot/vmlinuz-3.2.0-4-686-pae
                  root=/dev/sda7 chroot=$chroot rw
        initrd  $chroot/boot/initrd.img-3.2.0-4-686-pae.chroot
}

It'd be really cool if something like this was supported by initramfs-tools.

Patch and details can be found here:
  https://github.com/lemonsqueeze/boot_chroot
  https://github.com/lemonsqueeze/boot_chroot/blob/master/initrd.patch

Cheers
--
lemonsqueeze


-- Package-specific info:

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
COMPCACHE_SIZE=""
BOOT=local
DEVICE=eth0
NFSROOT=auto

-- no debconf information


Reply to: