Mon Mar 24 09:14:50 CDT 2014

Boot into chroot

It's straightforward, but doesn't work 100% seamless.

Key elements are:

- in /etc/grub/40_custom

menuentry 'Debian chroot' {
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    echo 'Loading Debian chroot ...'
    linux /debian/vmlinuz root=/dev/sda5 ro init=/debian/boot/chrootinit
    echo 'Loading initial ramdisk ...'
    initrd /debian/initrd.img

do 'update-grub' after editing

- in /debian/boot/chrootinit

/bin/mount -o remount,rw /
/bin/mount --bind /dev /debian/dev
/bin/mount --bind /    /debian/ubuntu
exec /usr/bin/chroot /debian /sbin/init

- the bind mound of /dev is essential
- could not get it to work withu the remount,rw though boot complains it can't do fschk
- switched from uuid mount to hardcoded /dev/sda5 in fstab (might not be necessary)
- something is not right with getty