LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel panic - not syncing: VFS: unable to mount root fs on uknown-block(253,0) (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-uknown-block-253-0-a-4175492093/)

fjur94 01-21-2014 09:43 PM

Kernel panic - not syncing: VFS: unable to mount root fs on uknown-block(253,0)
 
SLACKWARE LINUX 14.0

/dev/sda1 = /boot
/dev/sda2 = LVM Partition
/dev/lvfelix/swap = swap
/dev/lvfelix/var = /var
/dev/lvfelix/root = /
/dev/lvfelix/usr = /usr
/dev/lvfelix/opt = /opt
/dev/lvfelix/home = /home

After the installation finished and i boot the operating system this message shows up(see link below)

(picture)
http://postimg.org/image/3nvdh48ex/

markush 01-22-2014 01:08 AM

Hello fjur94, welcome to LQ,

I suppose you're using a generic kernel?

Seems your missing either the driver for the filesystem (ext4?) or the disk (ahci or ide?) in your initrd.

In general your errormessage means that the kernel cannot mount the / partition due to missing drivers.

I'd recommend to post Slackware-related issues in the Slackware-forums at LQ. I'll report this thread and ask for moving to the Slackware-Forums.

Markus

ChrisAbela 01-22-2014 04:34 AM

/var on a separate partition might not have been a good idea but I cannot locate the document I vaguely remember recommending against it so I cannot be sure.

Did you build an initrd? How?
Did you include the entry for initrd it in /etc/lilo.conf?
Did you run lilo -v after editing /etc/lilo.conf

Richard Cranium 01-22-2014 06:21 PM

http://www.linuxquestions.org/questi...9/#post5103222

Please don't double post your problem in the forum again.

fjur94 01-22-2014 08:25 PM

Sorry Richard

Chris, no i have not done that :S

Richard Cranium 01-22-2014 08:48 PM

No problem, it's just slightly annoying to have to post a reply in two different places.

fjur94 01-24-2014 02:02 PM

i made this vídeo during the installation, the most important part is when it is installing packages

See link below
http://www.youtube.com/watch?v=CsXP3Lb54ao

Note: i'm speaking spanish in the video

markush 01-24-2014 02:12 PM

Hi,

at least one problem is quite obvious. You use a partition with only 1 GB of size for your /usr directory, this is way too small. I don't know how lvm comes into play, but there are errormessages about "no space left on device". But I would recommend to create only three partitions, /, /home and /swap (if necessary) and you should know that after a complete installation, there are about 7GB used on /

Markus

Richard Cranium 01-24-2014 02:16 PM

One of your disk partitions filled up during the install. At that point, your system is insane. See which of the partitions is close to full, make it larger and reinstall from scratch.

(By the way, I've been there and done that.)

I've installed other things on this Slackware64 14.1 machine, but my current partition use is
Code:

~$ df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/vg1-rootlv        10G  1.2G  8.8G  12% /
/dev/sda2                    488M  39M  415M  9% /boot
/dev/mapper/vg1-homelv        32G  1.5G  31G  5% /home
/dev/mapper/vg1-varlv          20G  829M  20G  5% /var
/dev/mapper/vg1-optlv          16G  2.2M  16G  1% /opt
/dev/mapper/vg1-usrlv          20G  7.5G  13G  38% /usr
/dev/mapper/vg1-libvirtstore  121G  60M  115G  1% /var/lib/libvirt/images
tmpfs                        3.8G    0  3.8G  0% /dev/shm
tmpfs                        3.8G  33M  3.7G  1% /tmp

You'll note that a lot of stuff goes into /usr, which tends to be the one that fills up. My use of tmpfs for /tmp is not considered standard behavior but I reboot this laptop often.

fjur94 01-24-2014 11:56 PM

i resized the /usr partition, everything seems to be well with the installation but while booting another message appeared

See link below
http://postimg.org/image/o7ggy2zij/

markush 01-25-2014 03:49 AM

Please boot your install-CD and post the ouput of
Code:

fdisk -l
and then mount your /
Code:

mkdir /mnt/tmp/
mount /dev/rootpartition /mnt/tmp

where rootpartition is the device where your / resides. Then postthe output of
Code:

cat /mnt/tmp/etc/fstab
Furthermore I'd like to see the output of
Code:

ls -lh /mnt/tmp/boot
And please don't put your screenshots on external sites, LQ allows for upload of images, when you're writing your post look below at "Manage Attachments"

Markus

Richard Cranium 01-25-2014 06:55 AM

The OP will have to run
Code:

/sbin/vgchange -ay --ignorelockingfailure
prior to attempting to mount the root directory.

I would also like to know the mkinitrd command used to create the initrd.

fjur94 01-25-2014 01:02 PM

3 Attachment(s)
mkinitrd command:
chroot
$( /usr/share/mkinitrd/mkinitrd_command_generator.sh -r )

Changed lilo.conf

Code:

image = /boot/vmlinuz-generic-smp-3.2.29-smp
initrd = /boot/initrd.gz
root = /dev/lvfelix/root
label = Linux
read-only

i reinstalled again, but i have not reboot yet(im not sure how to boot from cd with vmware, thats why i reinstalled.)

(pictures shows fdisk -l and df -h)

fjur94 01-25-2014 01:29 PM

1 Attachment(s)
markush /mnt/tmp already exist

note: Have not rebooted yet, the system will be damaged again if i start it :s

picture shows (ls -lh /mnt/tmp/boot) and (cat /mnt/tmp/etc/fstab)

markush 01-25-2014 01:31 PM

Don't forget to run lilo again after creating a new initrd!

I use to have a "failsafe" option in my lilo.conf which means that I have also the huge-kernel available. This helps when there is something wrong with the initrd or the modules. Here the lines of my lilo.conf
Code:

# Linux bootable partition config begins
image = /boot/vmlinuz
  initrd = /boot/initrd.gz
  append = "resume=/dev/sda9"
  root = /dev/sda5
  label = Slack64-current
  read-only
###
image = /boot/vmlinuz-huge-3.10.17
  append = "resume=/dev/sda9"
  root = /dev/sda5
  label = failsafe
  read-only
# Linux bootable partition config ends

I can't help with lmv. But I would recommend to boot the huge kernel in order to find out if the problem is related to initrd or lvm.

Markus

fjur94 01-25-2014 01:41 PM

Markus why you dont put your Root lvm path on LILO root option

mine: root = dev/lvfelix/root

yours: root: dev/sda5

:s

markush 01-25-2014 01:46 PM

Well, I don't use lvm ;)

That's the reason why I can't help with lvm, I don't have any experience.

I posted the part of my lilo.conf to show you how I use the huge kernel in a case of kernel-panic with the generic kernel.

Markus

fjur94 01-25-2014 01:52 PM

i get it

Richard Cranium 01-25-2014 05:32 PM

What is the output of
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
?

fjur94 01-25-2014 08:04 PM

1 Attachment(s)
Code:

mkinitrd -c -k 3.2.29-smp -f ext4 -r /dev/lvfelix/root -m mbcache:jbd2:ext4 -L -u -o /boot/initrd.gz

yenn 01-26-2014 05:45 AM

Quote:

Originally Posted by fjur94 (Post 5105109)
Markus why you dont put your Root lvm path on LILO root option

mine: root = dev/lvfelix/root

Correct. Mine working lilo.conf for LVM

Code:

image = /boot/vmlinuz
root = /dev/cryptvg/root
initrd = /boot/initrd.gz
label = Slackware
read-only

Quote:

Originally Posted by fjur94 (Post 5105293)
Code:

mkinitrd -c -k 3.2.29-smp -f ext4 -r /dev/lvfelix/root -m mbcache:jbd2:ext4 -L -u -o /boot/initrd.gz

As far as I can see, mkinitrd command looks correct. Although question is, when did you execute this command. After installation? After reboot with install CD? Or within actual chroot?

If you execute this after installation, it will write initrd.gz to /boot of Slackware install CD (it will disappear after reboot). You want to execute it within your newly installed linux, so Lilo can pick it up.

I assume that you did full install or have at least on kernel in /boot. Just to make sure, could you mount your boot partition and see if kernel is actually there?

Look what is mounted right now (just to get clear picture what's going on).
Code:

$ mount
If real boot partition isn't already mounted, do it.
Code:

$ mount /dev/sda1 /mnt/boot
$ ls -l /mnt/boot

And if it doesn't list any files, then you have to install kernel package again. If there are files, then you can move to chrooting your system and re-run lilo.

I'll stop now and wait for output of commands above, then we can move further.

fjur94 01-26-2014 09:26 AM

3 Attachment(s)
i execute the mkinitrd command after installation without rebooting.

(/mnt/boot) didnt exist, so i created it.

Pictures shows (mount) and (ls -l /mnt/boot)

Note: i have not rebooted after i did the installation.

markush 01-26-2014 10:31 AM

Quote:

Originally Posted by fjur94 (Post 5105518)
i execute the mkinitrd command after installation without rebooting.

(/mnt/boot) didnt exist, so i created it.

Pictures shows (mount) and (ls -l /mnt/boot)

Note: i have not rebooted after i did the installation.

Well, thanks to yenn for asking ;)

Your approach seems quite odd. I'd strongly recommend that you put the huge kernel into your lilo.conf and boot with it (don't forget to rerun lilo). Then, when Slackware with the huge kernel is running, you may create the initrd, rerun lilo again and reboot then with the generic kernel.

Thanks to Richard Cranium for pointing me to this. I found this manual from Alien Bob, hope this helps.

Markus

Richard Cranium 01-26-2014 10:44 AM

Quote:

Originally Posted by markush (Post 5105545)
Well, thanks to yenn for asking ;)

Your approach seems quite odd. I'd strongly recommend that you put the huge kernel into your lilo.conf and boot with it (don't forget to rerun lilo). Then, when Slackware with the huge kernel is running, you may create the initrd, rerun lilo again and reboot then with the generic kernel.

Markus

Not recommended. You must have an initrd in order to have your root partition on a logical volume.

I'm running a 14.0 install on a virtual machine right now to see what state the installer should be in when it finishes.

fjur94 01-26-2014 11:53 AM

Quote:

Originally Posted by markush (Post 5105545)
Thanks to Richard Cranium for pointing me to this. I found this manual from Alien Bob, hope this helps.

I did the same that the guide says and nothing.

Richard Cranium 01-26-2014 12:14 PM

I recommend that you skip installing lilo as part of running setup. Then do the following immediately after setup exits:
Code:

mount -R /proc /mnt/proc
mount -R /sys /mnt/sys
mount -R /dev /mnt/dev
chroot /mnt
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r )
liloconfig

While in liloconfig, select the Simple menu choice.
Select standard for "CONFIGURE LILO TO USE FRAME BUFFER CONSOLE?"
No optional parameters.
Select "No" for "Use UTF-8 TEXT CONSOLE?"
Select MBR for "SELECT LILO TARGET LOCATION"

You'll get a message indicating that lilo didn't install. Press enter.

Then run...
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-smp-3.2.29-smp >>/etc/lilo.conf
Then use your favorite editor to edit /etc/lilo.conf; vi, emacs, nano, or whatever you would use when logged into a console. Delete lines 62 to 67 inclusive. Save the file and exit.

Next, run...
Code:

lilo
...which will give a warning or two. Then run...
Code:

exit
to get out of the chroot followed by ctrl-alt-delete to reboot.

fjur94 01-26-2014 04:32 PM

1 Attachment(s)
62 to 67, even the 'image' option ?

Richard Cranium 01-26-2014 05:13 PM

Don't know why ours are that different, but from the screen shot you provided, it's lines 59-64.

fjur94 01-26-2014 07:07 PM

1 Attachment(s)
I made a video because this is unexplainable

see link below
http://www.youtube.com/watch?v=qPFkQA4lkSc

Richard Cranium 01-26-2014 07:15 PM

I don't know if there is difference between selecting <Cancel> or actually using the Exit menu option to leave setup. I used the exit menu option.

Other than that, I'd have to run the installer under VM player. My tests were run in a VM running under libvirt.

fjur94 01-26-2014 07:26 PM

let me install it one more time, but this time using 'exit' option.

fjur94 01-26-2014 07:46 PM

Quote:

Originally Posted by Richard Cranium (Post 5105748)
I don't know if there is difference between selecting <Cancel> or actually using the Exit menu option to leave setup. I used the exit menu option.

There's no difference between using exit or cancel, same error.

Richard Cranium 01-26-2014 08:17 PM

OK, I'll have to try it under VM player.

Richard Cranium 01-26-2014 09:30 PM

My VM player version worked as expected.

What options did you select when you created the VM?

markush 01-26-2014 10:03 PM

The system tries to mount the root-device to /mnt, this is wrong!. lilo or mkinitrd seem not to have been running from a chroot-environment. Or Maybe there's a problem with the fstab.

Sorry for pointing you the wrong way, the error-messages looked too familiar to me ;)

Markus

Richard Cranium 01-26-2014 10:33 PM

Quote:

Originally Posted by markush (Post 5105810)
The system tries to mount the root-device to /mnt, this is wrong!. lilo or mkinitrd seem not to have been running from a chroot-environment. Or Maybe there's a problem with the fstab.

Markus

Well, no, that's OK.

The initrd init code mounts stuff in /mnt and then (essentially) does a chroot.

Code:

# Switch to real root partition:
  /sbin/udevadm settle --timeout=10
  echo 0x0100 > /proc/sys/kernel/real-root-dev
  mount -o ro -t $ROOTFS $ROOTDEV /mnt
 
  if [ ! -r /mnt/sbin/init ]; then
    echo "ERROR:  No /sbin/init found on rootdev (or not mounted).  Trouble ahead."
    echo "        You can try to fix it. Type 'exit' when things are done."
    echo
    /bin/sh
  fi
else
  echo
  echo "RESCUE mode"
  echo
  echo "        You can try to fix or rescue your system now. If you want"
  echo "        to boot into your fixed system, mount your root filesystem"
  echo "        read-only under /mnt:"
  echo
  echo "            # mount -o ro -t filesystem root_device /mnt"
  echo
  echo "        Type 'exit' when things are done."
  echo
  /bin/sh
fi

# Need to make sure OPTIONS+="db_persist" exists for all dm devices
# That should be handled in /sbin/mkinitrd now
/sbin/udevadm info --cleanup-db
/sbin/udevadm control --exit

unset ERR
mount -o move /proc /mnt/proc
mount -o move /sys /mnt/sys
mount -o move /run /mnt/run

[ "$DEVTMPFS" = "1" ] && mount -o move /dev /mnt/dev
echo "${INITRD}:  exiting"
exec switch_root /mnt $INIT $RUNLEVEL


Richard Cranium 01-26-2014 11:20 PM

When I installed my VM player version, there were more modules found by mkinitrd than the OP appears to have:
Code:

# This is a script used to load the kernel modules.
# To use it, chmod it 755, and then add the insmod
# lines needed to load your modules, like this:

modprobe -v mptbase
modprobe -v mptscsih
modprobe -v mptspi
modprobe -v mbcache
modprobe -v jbd2
modprobe -v ext4


fjur94 01-28-2014 09:15 AM

VM options

*i will install the operating system later, next
*guest operating system (other), version (other), next
*Virtual machine name (Slackware), next
*maximum disk size 30gb, split disk into multiple files, next
*customize hardware,
*memory (512)
*procesor (4 cores)
*new cd/dvd (use an iso image file)
*network adapter(bridged), close
*Finish

Richard Cranium 01-29-2014 01:42 AM

Try setting the guest operating system to Linux and the version to 3.x kernel.

markush 01-29-2014 04:11 AM

Hi,

today I had with my Slackware running on VMware also an Error "no /sbin/init found". Problem was that the initscript ran with wrong kernel (3.10.17 vs 3.10.17-smp). You should check that the kernel (uname -r) for which the initrd is created, is the same which will run on your system.

Markus

Richard Cranium 01-29-2014 08:00 PM

*shrugs* I ran the steps that I outlined in post #26 when I set up my VM in VMPlayer and the system booted just fine.

markush 01-29-2014 10:06 PM

I'd recommend to check /lib/modules if there is really a directory 3.2.29-smp and that the modules are really being build into the initrd (look at the output when the initrd is created).

Markus

fjur94 01-31-2014 12:10 AM

It finally worked, the problem was: setting guest operating system to other, then i did what Richard said...

Quote:

Try setting the guest operating system to Linux and the version to 3.x kernel.
After i installed on linux version 3.x, running the steps that richards outlined on "POST #26" it worked.

Also... i installed again without running these steps below from "POST #26" and it worked.

Code:

mount -R /proc /mnt/proc
mount -R /sys /mnt/sys
mount -R /dev /mnt/dev

Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-smp-3.2.29-smp >>/etc/lilo.conf
also i configured lilo on installation, not after. as outlined on "POST #26"

btw, this guide works too ftp://ftp.slackware.com/pub/slackwar...README_LVM.TXT

Note: i installed Slackware 19 times and the problem was VM option "linux version 3.x"

fjur94 01-31-2014 12:12 AM

Thanks Richard and Markush for all your help.!!

fjur94 01-31-2014 12:14 AM

1 Attachment(s)
Thanks guys, :D:D:D:D:D:D

Richard Cranium 01-31-2014 09:30 AM

Quote:

Originally Posted by fjur94 (Post 5108498)
Note: i installed Slackware 19 times [...]

Well, now you're an expert. :D

Have fun with your running system.


All times are GMT -5. The time now is 10:46 AM.