JP Vossen on 26 Jun 2013 14:25:48 -0700


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

[PLUG] CentOS-5, grub and ext4


I've been working to "P2V" a CentOS-5.9 server into ESXi. Since VMware Converter sucks again [1], I am just doing the "selective rsync of live machine into LiveCD-booted new VM" thing (gotta love Linux). So per some of the threads last week I thought I'd use ext4. BIG MISTAKE that cost me over 4 hours of t-shooting, let alone having to re-do the VM and 12-hour copy from scratch.

The really frustrating part is that grub kept telling me it couldn't find '.../stage1' but the file was RIGHT THERE in 'ls'. Eventually that was my clue...

Bottom line (and I should have thought to check first), CentOS-5 grub1 (0.97-13.10.el5) is so old that:
http://wiki.centos.org/HowTos/GrubInstallation#head-1af6017844797425b538fe7704873a91cb388380
Grub from CentOS 5 doesn't work with ext4fs. More precisely, it can't read the 256-byte inodes that ext4fs uses by default.

If you are using a half-way modern system you will be fine. But if, like me, you are stuck with old versions, watch out!

Then I lost several more hours getting rid of my mdadm and LUKS setups from my physical machine. I'd tell you how I did it but I don't know. I tried many, many things, and while I did them one at a time, I'm not 100% sure the last thing I did (copy /boot/initrd-2.6.18-348.6.1.el5.img from a "natively" built CentOS-5 VM) worked by itself or if other previous steps also contributed.

After that I lost a bit more time because I was unable to log in from the console. The correct password would "work" but something would flash by too fast to read (even too fast for VMware "capture movie" to catch it) and I'd be back at a login prompt. The wrong password would fail as expected, and single user mode worked fine. '/var/log/secure' looked right but '/var/log/messages' looked like it had SELinux errors. I usually don't run that but on this server I did, and it got annoyed/confused by the move. This fixed it:
	http://wiki.centos.org/HowTos/SELinux#head-867ca18a09f3103705cdb04b7d2581b69cd74c55
		genhomedircon
		touch /.autorelabel
		reboot

______________________________________________
Footnote:

[1] VMware-converter-en-5.1.0-1087880.exe sucks:
1) They only have a Windows version again
2) Per https://www.vmware.com/support/converter/doc/conv_sa_51_rel_notes.html 2.1) Converter Standalone does not recognize source volumes that reside on Linux Software RAID configurations 2.2) During cloning of powered on Linux machines, Converter Standalone does not recognize source volumes that are part of a Software RAID configuration (also referred to as multiple disk, or MD, configurations). 2.3) CAUTION: During cloning of powered on Linux machines, Converter Standalone 5.1 preserves the following source file systems on the destination: ext2, ext3, ext4, reiserfs, and vfat. All other source file systems are converted into ext3 file systems on the destination virtual machine. [Note missing XFS.] 3) *All* of my servers are running Linux software RAID + LVM, some of them are encrypted too. And the VMware converter error on the above is useless: "unable to create virtual machine". 4) It seems like it would only convert into ESXi, not workstation. Ironically the Windows VM I was running it from was *on* Workstation.

Since I only care about Linux, it's not all that hard to just rsync the suckers into new VMs. But...

Later,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|      http://bashcookbook.com/
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug