Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to make grub boot into a chroot directory /slack containing a Slackware Linux installation. This directory was created by issuing the following command:

  installpkg --root /slack a/*.t?z

where a/ directory contains the basic a/ instalation packages from slackware. I sucessfully chrooted into /slack and created the initrd image, by executing mkinitcpio command.

Finally, I created the following entry in /boot/grub/menu.lst:

title  Slackware Linux
root   (hd0,2)
kernel /slack/boot/vmlinuz root=/dev/sda3 rw init=/slack/boot/chrootinit 
initrd /slack/boot/initrd.gz

where /slack/boot/chrootinit is a script that chroots into /slack:

exec /usr/sbin/chroot /slack /sbin/init

The system boots sucessfully but even with the "rw" option, the root partition is mounted as readonly. Several warning messages about this problem are displayed and the system finally hangs. Any solutions?

(REF: http://forum.soft32.com/linux2/Booting-chrooted-directory-ftopict51395.html)

share|improve this question
i was wrong, this is a question re. the rw boot option :/ – Ulrich Dangel Jul 18 '12 at 0:16
up vote 3 down vote accepted

I am not sure why the filesystem is being mounted read-only since you have specified rw. Perhaps the kernel is actually mounting the initrd image read-write instead, and then that initrd image mounts your root fs as read-only.

In any case, typically the kernel is expected to mount the root fs read-only, and then at some point, init will remount it read-write.

Perhaps you could modify your chrootinit script to perform that step first:

/bin/mount -o remount,rw /
exec /usr/sbin/chroot /slack /sbin/init
share|improve this answer
Yes, that worked, I just had to change rw back to ro in grub`s entries because it complains root fs must be mounted first as read only before remounting. Just for curiosity, in a normal linux intallation, who is responsible for doing this remounting as read and write? – Slack question Jul 17 '12 at 16:38
It varies, but it usually happens in an rc script, early in the init process. On my Debian box, I see it gets remounted in /etc/rcS.d/S07checkroot.sh, after setting up udev and some other kernel services. – mrb Jul 17 '12 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.