I was bitten by this baselayout issue. Unfortunately for me, I couldn't just boot from the LiveCD and chroot into my install - the linux-headers version was greater than the kernel on my LiveCD version, so chroot wouldn't run ("kernel too old"), and on my arch (sparc64) there isn't a LiveCD that has a recent enough kernel for chroot to work.
Not only could I not chroot, but my filesystem is spread out over several partitions -- simply using the LiveCD to mark FSTAB to not check the root partition on boot wasn't going to work to boot the system and downgrade baselayout.
I was beginning to think I was going to have to reinstall, but here's how I fixed it in the end (culling from these posts, you guys are great for ideas):
PREFACE: USE AT YOUR OWN RISK .. although I think it's all relatively harmless ... read to the end of this post before trying my method.
Step 1 - Modify /etc/fstab
Boot the LiveCD and mount the system's root filesystem. Modify FSTAB to read 0 on the "pass" parameter of the root filesystem. Reboot, and let machine boot into your install.
Step 2: Login for "maintenance" during boot
The init scripts are going to bail out when the remainder of the partitions can't be mounted, so enter the root password.
Step 3: Manually create /dev/ nodes for your partitions.
In my case, MAKEDEV wouldn't / couldn't create /dev/sda* nodes for my SCSI disk. (And thank [deity] these commands were available.) So I resorted to using mknod.
This link got me started:
http://www.faqs.org/docs/linux_admin/x797.html
Following that link, I downloaded the kernel sources onto another computer (my /usr/ is on a seperate partition on my broken gentoo install.. lucky me) and sourced linux/Documentation/devices.txt for the device major / minor numbers for the SCSI disk (in my case, the major number was 8, the minor was the number of my partition, eg sda1 = 1, sda4 = 4).
So the command finally ended up:
I repeated it until the /dev/ node for each partition was created.
Step 4: Mount paritions as per /etc/fstab
Yeah, baby, we have a working root environment now ..
Step 5: Downgrade baselayout
I emerged baselayout 1.11.13-r1, since this was the last version installed:
Code: Select all
emerge --oneshot =sys-apps/baselayout-1.11.13-r1
Step 6: Run dispatch-conf
I studiously replaced all the /etc/init.d/ scripts, and any config files I hadn't modified / knew were harmless.
Step 7: Unmount filesystems
I wasn't sure if the partitions would be properly unmounted / synced when I rebooted, so I ran "sync", and then unmounted everything except for my root partition.
Step 8: exit
Type "exit".
To my surprise, it went ahead and continued booting -- went through the remaining init-scripts. X didn't come up, I imagine due to missing /dev/ nodes. At this point, I changed my fstab back to its original settings, and rebooted.
Viola.
I'm not sure about a lot of it. By issuing mknod, not sure if it somehow burned those nodes permanently into /dev/. Also, I'm not sure exactly how safe mouting the root filesystem without running fsck is.
At any rate, it's fixed.
And I hope this baselayout issue get fixed soon. I didn't see a bug for it at bugs.gentoo.org .. do we need to file one?
chance