A better way to do this is to boot once using the root=/dev/hdb1 (or
whatever) and then use the "rdev" command to change the root device in
your kernel. I think you use it like:
rdev /dev/hdb1 /boot/vmlinuz
that will change /boot/vmlinuz to use /dev/hdb1 as its root device.

Andre

> It is possible to change this on an existing installation, even if you
> can't connect it to the original install place.
> 
> First step is to pass the kernel your new root filesystem location. This
> is done via the kernel command line, in LILO just append whatever
> options you want after your image name. (I don't recall how to do the
> same thing in GRUB, but it will be possible..)
> 
> The option you need to pass in this instance is `root=<fulldev>`
> (without quotes), where <fulldev> is either the major:minor numbers of
> your new root filesystem, or the full device path (ie, /dev/hda1). 
> 
> You'll also need to pass an option to shortcut the boot process and just
> give us a root shell. This option is `init=/bin/sh` (without quotes).
> 
> The kernel should boot, and where you'd normally see init load, you'll
> be dumped out to a prompt like such: "(none):#".
> 
> Before you can fix up the remounting of filesystems, you need to remount
> the root filesystem as read-write. This is because the kernel always
> mounts the root filesystem read-only. You can remount it with:
> 
>       mount -o remount -w /
> 
> Once remounted, make sure you've mounted any other critical filesystems,
> you'll need /boot, and /etc. Make sure you mount those read-write as
> well. For example, if my /boot is on /dev/hda1, mount it like:
> 
>       mount -w /dev/hda1 /boot
> 
> Now, you'll need to fix up the bootloader's configuration. For LILO,
> edit/etc/lilo.conf and change "boot=" and "root=" as appropriate. Re-run
> LILO once you're done.
> 
> Lastly, you'll need to change the table used to mount file systems,
> /etc/fstab. Edit each line there to suit the new drive location.
> 
> Finally, ensure all your changes are written to disk by typing:
> 
>       sync
> 
> YOU MUST SYNC THE FILESYSTEM BEFORE REBOOTING or your changes will not
> hit the media. Hit Control-Alt-Del, and things should boot normally. 

Reply via email to