Pagina 1 di 1

devtmpfs: error mounting -2

Inviato: mer 3 ago 2011, 11:56
da y33t
Good day to all,

I am running Slack64 13.37 on my desktop with a dedicated sata hard drive. I have an other identical desktop with identical hardware that runs windows 7 (which sucks) and when I plug windows 7 hard drive to my Slack64 box as secondary slave/master, I get the following error at booting phase ;

Codice: Seleziona tutto

VFS: Mounted root (ntfs filesystem) readonly on device 8:1
devtmpfs: error mounting -2
Freeing unused memory
             ....
             ....
Kernel Panic - not syncing : No init found.Try passing init=  to kernel
Pid: 1, comm:swapper Not tainted 2.6.37.6 #3
call trace;
              panic+0x91/0x194
              init_post+0x8c/0xe0
              kernel_init+0x1d7/0x1e2
              ? kernel_thread_help .........
and so on. I think it can be about the partition (around 100mb) that sucky windows dedicates for recovery and such but I can't say that I'm positive on this.

Anyone experienced this ?

Re: devtmpfs: error mounting -2

Inviato: mer 3 ago 2011, 17:52
da 414N
To me it seems like Slackware picked a partition from your Windows 7 HDD (notice the "ntfs filesystem") and tried to use it as its root (/) partition.
Obviously, that's gonna fail epically...
This is probably due to the fact that both in your /etc/lilo.conf and /etc/fstab files you specified the partitions by device name (e.g: /dev/sda4). When you plug a new disk on your PC motherboard, those device names are (almost certainly) gonna change, shifting by a letter. For example, if your Slackware disk previously was /dev/sda, now it can be /dev/sdb, and /dev/sda points to the Windows 7 disk.
If your intention is to boot the Slackware partition without having to care whether or not the Windows 7 disk is plugged, I think you should modify your /etc/lilo.conf and /etc/fstab files to only use the disk UUIDs instead of the device names. The UUID is a sequence of characters which uniquely identifies a disk/partition. You can view the UUIDs of your partitions with

Codice: Seleziona tutto

ls -l /dev/disk/by-uuid/
You should modify the /etc/fstab entries from (this is an example picked from my fstab file):

Codice: Seleziona tutto

/dev/sdb10       /                ext4        defaults,noatime         1   1
to:

Codice: Seleziona tutto

UUID=xxxxx       /                ext4        defaults,noatime         1   1
where xxxxx is the UUID for the /dev/sdb10 partition as /dev/disk/by-uuid/ reports.
/etc/lilo.conf "root=" entries should be modified from this

Codice: Seleziona tutto

root=/dev/sdXn
to

Codice: Seleziona tutto

root="UUID=xxxxxx"
Please pay attention to the boot= option in /etc/lilo.conf. That option is not compatible with device UUIDs, so you should carefully change it whenever you need to reinstall LILO in the correct hard disk MBR.
To apply these changes you have 2 ways. The simpler one consists of temporarily disconnecting the Windows 7 disk from the motherboad, boot Slackware as usual (it should boot with no problem now) and perform the changes (edit /etc/fstab,/etc/lilo.conf and reinstall LILO).
The not-so-simply-one consists of booting the system from the Slackware install disk, mount the Slackware root partition under a temporary folder and chroot in it. In order to see the UUIDs of your partition, you have to mount the /proc pseudo-filesystem prior the chrooting:

Codice: Seleziona tutto

mount -t proc none /mnt/gentoo/proc

Re: devtmpfs: error mounting -2

Inviato: mer 10 ago 2011, 2:21
da y33t
Thank you, it works.

Re: devtmpfs: error mounting -2

Inviato: mer 10 ago 2011, 10:22
da 414N
Glad to hear that.
Could you please add a [RESOLVED] tag to the title of your first post?