Booting into a chrooted directory
- From: mblondel@xxxxxxxxx
- Date: 24 Mar 2006 07:44:04 -0800
Hi,
I have built a basic debian system with the debootstrap tool and put it
in /mydebian/ on my current Linux installation. I chrooted into it,
installed the packages and the kernel I wanted.
Now I would like to test this system. So my purpose is to boot into a
chrooted directory.
What I have tried out so far :
- In /boot/grub/menu.lst:
[...]
title My Debian
root (hd0,0)
kernel /mydebian/boot/vmlinuz-2.6.15-1-486 root=/dev/hda1
init=/mydebian/chrootinit quiet splash
initrd /mydebian/boot/initrd.img-2.6.15-1-486
boot
- In /mydebian/chrootinit:
#!/bin/bash
mount -t proc /proc /proc
mount -o bind /proc /mydebian/proc
mount -o bind /dev /mydebian/dev
exec /usr/sbin/chroot /mydebian/ /sbin/init
So basically, the boot loader tells the kernel to use
/mydebian/chrootinit as init script, the latter executing /sbin/init in
a chrooted directory.
When I boot into "My Debian", the kernel is loaded correctly and the
init process starts. But for a reason I don't know, / is mounted as
read only, which causes some errors during the init process. It finally
hangs on when syslogd is started.
So my question is : How can I make the root writable ?
Thanks,
Mathieu
.
- Follow-Ups:
- Re: Booting into a chrooted directory
- From: Douglas Mayne
- Re: Booting into a chrooted directory
- Prev by Date: Re: Using minicom to talk to a router
- Next by Date: Question about certificate in FC4
- Previous by thread: fiber on a linux workstation
- Next by thread: Re: Booting into a chrooted directory
- Index(es):
Relevant Pages
|