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

Re: root-partition

On Sun, 12 Nov 2000, Joachim Kunze wrote:

> Hi,
> "Stephen C. Tweedie" schrieb:
> >
> > Are you using an initrd?  An init ramdisk setup means that the root
> > filesystem is actually inside the kernel image, and the on-disk root
> > only gets mounted later.  In that case, the "rootflags" may end up
> > being applied to the wrong filesystem.
> Great - that's it !
> Using initrd caused the problems on the machines I use ext3.

In case anyone wants to try converting root to ext3 on machines that use
initrd, here's how I did it:

Create the journal file normally.

* Make a copy of your active initrd image from /boot, uncompress it.
Mount the uncompressed image via the loopback device.  The uncompressed
ramdisk will about 1.4 megabytes.

* Create a new ramdisk image.  It should be just a little bit less than 4
megabytes long.  Ramdisks are limited to 4 megabytes in size.  Mount the
new ramdisk iamge via a second loopback device.

* Copy the contents of the old ramdisk to the new ramdisk verbatim.

* Make a copy of your libc.so.6 and ld-linux.so.2 shared libraries.  Strip
both shared libraries.  After you strip them, they'll be small enough to
copy to /lib on your new ramdisk.

* Copy mount and umount to /bin on your new ramdisk.  sash's builtin
mount/unmount doesn't support the required options, and that's why you
need to have the full mount/umount on the new ramdisk.

* Create /mnt and /dev in the new ramdisk.  Create the /dev device nodes
for your hard disk, in the ramdisk's /dev (/dev/sda* or /dev/sdb*).

Edit the existing linuxrc in the ramdisk image, and append the
mount/unmount commands at the end:

/bin/mount -n -t ext3 -o noload,journal=XXXX /dev/sda1 /mnt
/bin/umount -n /dev/sda1

You'll need to specify your actual partition and the journal file.

* Unmount the ramdisk, compress the image, copy it to /boot.

* Create a new lilo stanza that uses the new ramdisk, run lilo, then use
the new ramdisk to boot.

You'll only need to use the new ramdisk once.  After you booted
succesfully, you can get rid of it, and its lilo entries, and change / to
ext3 in /etc/fstab.


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