Recently I had to create a new partition on my laptop’s hdd to install OS X (I wanted to have a dual boot of Gentoo and OS X). I had no free space on the disk so the only way to create a new partition was to shrink the existing root partition with Gentoo. Since it was formatted as JFS and JFS doesn’t allow shrinking I had to back up all the data on the root partition, delete it, create a new (smaller) one and format it as JFS. So the steps were:
- Create a backup of the root partition with
tar -cvpjf --sparse --one-file-system backup_of_root.tar.bz2 /
Note: only the contents of the root partition will be archived since –one-file-system option is specified (no dev, proc, …) WARNING! If your filesystem is mounted with extended attributes support (see /etc/fstab) and you use programs utilizing this feature (such as SELinux) you shouldn’t use tar since it won’t store any extended attributes. Use sta, pax or cpio - Boot with a live CD and delete the partition as well as create a new one with fdisk
jfs_mkfs /dev/sdaN(where N is the partition number)- Extract the backup with
tar -xvpjf backup_of_root.tar.bz2 - Reboot and … a kernel panic
On my system it was “Kernel panic – not syncing: Attempted to kill init!”
After a week of kernel debugging, initrd debugging and browsing of forums I have finally found out that init script is missing character files in /dev filesystem: /dev/console and /dev/null. Without these two your Gentoo installation (and some other distributions as well) just won’t boot without telling you why!
So all you need to do to make your restored system boot again are two commands:
mknod /dev/null c 3 1
mknod /dev/console c 5 1
Happy fixing!
Comments 2
А чем дело с OS X закончилось?
Posted Sunday February 1st, 2009 at 02:13 AM ¶Я только в vmware заводил, на реальном железе не пробовал.
Есть проблема с дровами под ATI Radeon Mobility x1400 – полноценно работающих просто не существует пока.
Posted Wednesday February 4th, 2009 at 07:51 PM ¶Еще звук не пашет. А так – и Gentoo и Leopart на одном ноуте отлично уживаются. Grub рулит
Post a Comment