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

Re: root-partition

On Wed, Nov 01, 2000 at 04:49:35PM +0100, Joachim Kunze wrote:
> Hi all,
> I've been working with the ext3-fs for several months (since 0.0.2c),
> and it works pretty fine for me, but I haven't found out, how I works to
> migrate my root-partition from ext2 to ext3.
> I tried it with the commands at the lilo-prompt, but it didn't work.
> I only received a kernel panic.
> Any ideas, how I can migrate to ext3 on my root-partition?
> tnx,

I almost don't want to say how I did it, but it does in fact work.

Machine has a 30G disk, with 128MB swap partition, 30MB boot partition,
and the rest is root. ("But you should have 9 very tiny partitions. That
root is way too big, let me tell you why blah blah blah." Whatever.)

What I did was disabled swap, reformatted the swap partition as ext2, set
the type from swap to "linux" and copied just enough of the real root
partition (bin, sbin, etc, lib, ... usr wasn't needed) to boot. Just add a
stanza to your lilo.conf for this "alternate" root partition. Boot. (I
didn't even boot single user - it errors all over the place but who cares).

mkdir /mnt/realroot
mount -t ext2 /dev/hdaX /mnt/realroot
dd if=/dev/zero ..... exactly as from the doc
ls -i /mnt/realroot/.journal.dat
umount /mnt/realroot
mount -t ext3 -o noload,journal=XXXX /dev/hdaX /mnt/realroot 

It should mount fine now. Be wary of a too small journal file. I 
recommend following the ext3 docs on beta.redhat.com exactly.

[Linux machines (and probably *BSD) can be maintained by a good sysadmin
without any of the delusions in /usr. This situation is why. (And network
mounted /usr partitions, but thats another story) Never attempt running 
a "real" unix without /usr.]

Remember to change the real root partitions /etc/fstab, rerun lilo, 
and then reboot.

It should come up with / being an ext3 partition type. I would
cat /proc/mounts just to make SURE that its an ext3. If all goes well,
take the fake root out of lilo.conf, mkswap on your swap partition, and 
change the swap partitions type back to "swap". Rerun lilo.

Reboot to regain your swap partition.
(I have to reboot to regain swap due to being conservative about the warning
that fdisk prints out when I write out the new partition table. YMMV]


No warranty express or implied. Always wear your seatbelt. Professional
driver on closed course. Do not attempt these maneuvers. Not all investments
go up, some go down. Not FDIC insured. If it breaks in two, keep both

Hunter Matthews                          Unix / Network Administrator
Office: BioScience 222/244               Duke Univ. Biology Department
Key: F0F88438 / FFB5 34C0 B350 99A4 BB02  9779 A5DB 8B09 F0F8 8438
Never take candy from strangers. Especially on the internet.

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