| View previous topic :: View next topic |
| Author |
Message |
tskuzzy n00b

Joined: 13 Aug 2008 Posts: 57
|
Posted: Mon Sep 29, 2008 2:30 pm Post subject: [SOLVED-ish] /dev not populated (old topic: Kernel panic) |
|
|
Yep, kernel panic again! woohoo...
"Kernel panic - not syncing: no init found. Try passing init= option to kernel."
/boot/grub/menu.lst
| Code: | title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-19-generic root=/dev/sda10 ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,9)
kernel /boot/memtest86+.bin
quiet
title Gentoo Linux
root (hd0,0)
kernel /boot/kernel-2.6.26-gentoo-r1_2 root=/dev/sda5
title Gentoo Linux (rescue)
root (hd0,0)
kernel /boot/kernel-2.6.26-gentoo-r1_2 root=/dev/sda5 init=/bin/bb
title Microsoft Windows XP Professional
root (hd0,2)
savedefault
makeactive
chainloader +1 |
/etc/fstab
| Code: | /dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda5 / ext3 noatime 0 1
/dev/sda6 /home ext3 noatime 0 2
/dev/sda7 /var reiserfs noatime,notail 0 2
/dev/sda8 /usr reiserfs noatime,notail 0 2
/dev/sda9 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,user 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
fdisk -l
| Code: | # fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41074107
Device Boot Start End Blocks Id System
/dev/sda1 1 4 32098+ 83 Linux
/dev/sda2 5 45898 368643555 5 Extended
/dev/sda3 * 45899 60801 119708347+ 7 HPFS/NTFS
/dev/sda5 5 259 2048256 83 Linux
/dev/sda6 260 25883 205824748+ 83 Linux
/dev/sda7 41054 41435 3068383+ 83 Linux
/dev/sda8 41436 45260 30724281 83 Linux
/dev/sda9 45261 45898 5124703+ 82 Linux swap / Solaris
/dev/sda10 25884 41053 121852993+ 83 Linux
Partition table entries are not in disk order |
So here's the story:
Originally, I installed Ubuntu on my Gentoo /home partition (sda6) because I didn't feel like repartitioning. But then I decided to enlarge my Windows partition (sda3) and also decided to make a new separate Ubuntu partition while I was at it. The partitioning appeared to go perfectly well (there were 2 warnings but I couldn't figure out how to view them, so I ignored them). Then I simply copied over all my Ubuntu system files to the new Ubuntu partition. All sorts of bad started happening then. Windows would boot, but I couldn't login, it would keep automatically logging me out. Ubuntu wouldn't boot properly, it kept taking me to this weird Busybox terminal thing. And Gentoo had this kernel panic.
So I managed to get Ubuntu to boot, but I can't login normally (I can login only by choosing Failsafe Terminal session). I don't really care too much about my Ubuntu/Windows partition right now (as long as the files on them are safe), but I want to fix my Gentoo.
Help please?
EDIT: Ok, I tried chrooting into Gentoo from Ubuntu Failsafe Terminal session, and I couldn't do it. I mounted everything but got this:
| Code: | # chroot /mnt/gentoo /bin/bash
chroot: cannot run command '/bin/bash': No such file or directory |
I checked the Gentoo /bin directory and bash was there.
EDIT 2: When I was moving the Ubuntu sys files from /home to the new partition, I ran into a problem. Mid-way through the move, almost all of my commands stopped working. That includes mv, cp, ls, etc. I could still use cd. I think this happened while I was moving either the lib, lib32, or lib64 folders. That struck me as very odd, since I wasn't moving my Gentoo sys files. Could this be the problem? Remember, I can't chroot into Gentoo from Ubuntu because of it couldn't find /bin/bash (see first edit).
Last edited by tskuzzy on Mon Sep 29, 2008 6:24 pm; edited 7 times in total |
|
| Back to top |
|
 |
.yankee Apprentice


Joined: 23 Feb 2008 Posts: 162 Location: Polska
|
Posted: Mon Sep 29, 2008 3:04 pm Post subject: Re: Kernel panic - not syncing: no init found |
|
|
Ekhmm...
| tskuzzy wrote: |
| Code: |
kernel /boot/kernel-2.6.26-gentoo-r1_2 root=/dev/sda5 init=/bin/bb
|
|
And what is THIS (/bin/bb) supposed to do? You sure it's a proper init? Try removing or commenting that out  |
|
| Back to top |
|
 |
tskuzzy n00b

Joined: 13 Aug 2008 Posts: 57
|
|
| Back to top |
|
 |
.yankee Apprentice


Joined: 23 Feb 2008 Posts: 162 Location: Polska
|
Posted: Mon Sep 29, 2008 3:58 pm Post subject: |
|
|
Uh, right - this is the busybox - didn't check...
Well, then maybe you've got some partition numbering changes? Boot a livecd and do :
(Post the output, if you don't know how to make use of it yourself...) |
|
| Back to top |
|
 |
tskuzzy n00b

Joined: 13 Aug 2008 Posts: 57
|
Posted: Mon Sep 29, 2008 4:13 pm Post subject: |
|
|
I double, triple, quadruple checked to make sure all the partitions are correct.
Here it is anyways, fdisk -l:
| Code: | # fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41074107
Device Boot Start End Blocks Id System
/dev/sda1 1 4 32098+ 83 Linux
/dev/sda2 5 45898 368643555 5 Extended
/dev/sda3 * 45899 60801 119708347+ 7 HPFS/NTFS
/dev/sda5 5 259 2048256 83 Linux
/dev/sda6 260 25883 205824748+ 83 Linux
/dev/sda7 41054 41435 3068383+ 83 Linux
/dev/sda8 41436 45260 30724281 83 Linux
/dev/sda9 45261 45898 5124703+ 82 Linux swap / Solaris
/dev/sda10 25884 41053 121852993+ 83 Linux
Partition table entries are not in disk order
|
Also, I just remembered something:
When I was moving the Ubuntu sys files from /home to the new partition, I ran into a problem. Mid-way through the move, almost all of my commands stopped working. That includes mv, cp, ls, etc. I could still use cd. I think this happened while I was moving either the lib, lib32, or lib64 folders. That struck me as very odd, since I wasn't moving my Gentoo sys files. Could this be the problem? Remember, I can't chroot into Gentoo from Ubuntu because of it couldn't find /bin/bash (see bottom of my original post) |
|
| Back to top |
|
 |
tskuzzy n00b

Joined: 13 Aug 2008 Posts: 57
|
Posted: Mon Sep 29, 2008 4:50 pm Post subject: |
|
|
Ok, I just found out something else. /lib points to /lib64, which is empty. That sounds like a problem... Is it ok to just get the lib64 library from a stage3 tarball and stick it in?
EDIT: Ok, so I stuck the lib64 libraries from a stage3 tarball and I managed to chroot into Gentoo. However, when I boot into Gentoo, a bunch of stuff fails. I think this is due to /dev not being right. /dev only has 14 items in it, but I can't figure out why. Help?
EDIT 2: Still with the udev problem. I rebuilt the kernel and modules but with no luck. I found the error though: "/lib/rcscripts/addons/udev-start.sh: line 86: /sbin/udevtrigger: no such file or directory". Help? |
|
| Back to top |
|
 |
.yankee Apprentice


Joined: 23 Feb 2008 Posts: 162 Location: Polska
|
Posted: Mon Sep 29, 2008 5:51 pm Post subject: |
|
|
Oh my, what a mess...
This means, you had no /lib/ content? If you somehow got rid of it all, and pulled the libs from stage3 tarball, that means you only have libs for the minimal system apps (right?)... So probably no udev as well - try if you can emerge that (sys-fs/udev), and if you do - reboot and try
if it fails, installs only a few things, or (most probable) just doesn't solve your problems, see if you've got revdep-rebuild (from gentoolkit) - and use it... Or else just go for
...And have a looong nap.
Should it show a will to emerge really a lot, you can, instead, issue something like
| Code: |
(emerge -vae world || emerge --resume --skipfirst || emerge --resume --skipfirst || emerge --resume --skipfirst) && date || (emerge --resume --skipfirst; date)
|
Have fun... |
|
| Back to top |
|
 |
tskuzzy n00b

Joined: 13 Aug 2008 Posts: 57
|
Posted: Mon Sep 29, 2008 6:02 pm Post subject: |
|
|
Hey thanks for your advice/help btw!
Hm... Doesn't /lib store only necessary system libraries for programs in /bin? Program libraries and programs are stored in /usr if I remember correctly. In my chrooted environment (where /dev is all nice and well), I have full access (to my knowledge) of all my programs. The problem is that /dev isn't populated during a regular boot.
My current questions is this: Is it safe to simply copy over /dev files from my Ubuntu partition (which boots fine) to my Gentoo partition? I mean, in my chrooted environment, I binded /dev (Ubuntu) to /dev (Gentoo) so I see no reason why I can't simply copy over the files. Any thoughts on this?
Last edited by tskuzzy on Mon Sep 29, 2008 6:21 pm; edited 2 times in total |
|
| Back to top |
|
 |
.yankee Apprentice


Joined: 23 Feb 2008 Posts: 162 Location: Polska
|
Posted: Mon Sep 29, 2008 6:17 pm Post subject: |
|
|
| tskuzzy wrote: |
My current questions is this: Is it safe to simply copy over /dev files from my Ubuntu partition (which boots fine) to my Gentoo partition? I mean, in my chrooted environment, I binded /dev (Ubuntu) to /dev (Gentoo) so I see no reason why I can't simply copy over the files. Any thoughts on this? |
Now that's what you're up to!
Nope, you can't - at least not that simply. You must use the mount -o bind trick - as in gentoo handbook :
| Code: |
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
|
(assuming /mnt/gentoo is where you've mounted the old gentoo root filesystem).
And no, /lib does not only contain things from stage3. And it does include udev libraries, so you surely need to reemerge that! |
|
| Back to top |
|
 |
tskuzzy n00b

Joined: 13 Aug 2008 Posts: 57
|
Posted: Mon Sep 29, 2008 6:23 pm Post subject: |
|
|
Awesome, I fixed the udev problem. I remerged udev and I changed "RC_DEVICE_TARBALL=no" to yes in /etc/conf.d/rc. But now KDE4 starts up as a white screen with a functional mouse pointer. =/
I suspect that's a minor hardware problem though. I'm gonna give my computer a good rest after tackling this problem for 5 hours straight (booting and rebooting and messing around with all kinds of scary stuff )
Thanks again! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|