[SOLVED] slackware64-14.2 : Error booting kernel generic on /dev/sda2
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
slackware64-14.2 : Error booting kernel generic on /dev/sda2
Hi,
VBox with slackware64 14.2, fresh install
Boot on huge kernel : nothing to report
Boot on generic kernel (initrd.gz made with the shell script in /usr/share/mkinitrd/) :
just after insmod part :
Code:
mount: mounting /dev/sda2 on /mnt failed : No such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
mount: mounting /dev/sda2 on /mnt failed : No such device
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
That is a little bit weird. Your root device is /dev/sda2 and it says it does not exist and it even says it would be mounted to /mnt instead of /.
At least you can boot using kernel-huge. Check very well your /etc/fstab from beginning to end. Also, could you show the command that the script in /usr/share/mkinitrd/ gives you (?)
Last edited by slac; 03-12-2021 at 05:08 PM.
Reason: spell-checking
VBox with slackware64 14.2, fresh install
Boot on huge kernel : nothing to report
I find the lack of a dash between the words huge kernel curious. My 14.2 system has those words reversed and there is a dash (-) between them. Is this a typo?
Quote:
fdisk -l :
Code:
/dev/sda1 ... 2G 82 Linux swap
/dev/sda2 * ... 20G 83 Linux
Is it not recommended to put the / on the 2nd partition in the case of a generic kernel ?
To boot, my machine required a EFI partition, even though it is not used, so your lack of a EFI partition has me asking why it wasn't required.
Which made my swap partition /dev/sda3, because / is /dev/sda2. And EFI is /dev/sda1.
After posting what is above I noticed your fstab has a swap partition doesn't indicate a mount point. It says swap swap. Shouldn't that be /swap swap ?
Last edited by quickbreakfast; 03-12-2021 at 05:15 PM.
bash-4.3# /usr/share/mkinitrd/mkinitrd_command_generator.sh
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 4.4.240 -f ext4 -r /dev/sda2 -m jbd2:mbcache:ext4 -u -o /boot/initrd.gz
I'm on slackware64-current for a while, with /dev/sda1 on /
nothing to report
My question is just : If I use a generic kernel, is it not recommended or not to put the / on the 2nd partition ?
It's just a VM, I don't want anyone to waste time on this if it's not appropriate
My question is just : If I use a generic kernel, is it not recommended or not to put the / on the 2nd partition ?
It's just a VM, I don't want anyone to waste time on this if it's not appropriate
I don't know, but why bother? Just set up a swap file instead of a swap partition in the VM.
My question is just : If I use a generic kernel, is it not recommended or not to put the / on the 2nd partition ?
As a supposition if you are referring to "/dev/sda2 / ext4 defaults 1 1" ["/"] in /etc/fstab then it should not matter, it is all right to have it there.
This MAY BE the solution: What are you using to boot up? Lilo or grub? Because if you are using lilo you need to execute "lilo" as root every time you rebuild the mkinitrd or "eliloconfig" if you are using EFI.
I don't know, but why bother? Just set up a swap file instead of a swap partition in the VM.
I probably misspoke, sorry
In fact, this is a fresh install, everything is by default
The worry does not come from the swap
The choice of partitioning being left to the user's discretion, I just wanted to know if it was a good idea or not to put the / on /dev/sda2 ?
In summary :
Either it's not a good idea
Either it doesn't matter, in this case, there is a problem with the generic kernel when the / is positioned on the 2nd partition
The generic kernel does not have any problem having "/" on "/dev/sda2", nor on any other partition which I have used.
Recently, on actual hardware, I did run into a situation where the huge-kernel would boot a particular computer just fine, but the generic-kernel would not. The solution was that I needed to give mkinitrd a list of modules to use during booting, so that the kernel would be able to access the hard-drive --- the problem was in figuring out which modules. Eventually, I figured it out. This computer is using the generic-kernel and has "/" on "/dev/sda2".
I probably misspoke, sorry
In fact, this is a fresh install, everything is by default
The worry does not come from the swap
Maybe not.
But in post #1 your fstab doesn't have a swap mount point, (aka /swap) so I'll bet when the computer goes looking for partition number 2 (your root partition) it doesn't find a second mounted partition.
So humour me and in your fstab give your swap a mount point.
Quote:
The choice of partitioning being left to the user's discretion, I just wanted to know if it was a good idea or not to put the / on /dev/sda2 ?
In summary :
Either it's not a good idea
If putting your root partition as /dev/sda2 is the default suggestion, then it's a good idea.
Last edited by quickbreakfast; 03-12-2021 at 05:56 PM.
I just wanted to know if it was a good idea or not to put the / on /dev/sda2 ?
In summary :
Either it's not a good idea
Either it doesn't matter, in this case, there is a problem with the generic kernel when the / is positioned on the 2nd partition
I think I get what you are saying now. Basically, you want if there could be a problem if you put the root filesystem ("/") in a block device that is not the 1st one (/dev/sda1), in this case, having root in /dev/sda2. Well... About that, if you are using a gpt partition scheme then it should not matter at all, you can have the root partition in /dev/sda1 or /dev/sda61, or maybe inside of an LVM, RAID or encrypted container, it does not matter. But if you are using MBR then you need to put the root partition in a PRIMARY partition and not in a logical partition, you can only have up to 4 primary partitions in MBR, also if /boot is separated it must be a primary partition.
But in post #1 your fstab doesn't have a swap mount point, (aka /swap) so I'll bet when the computer goes looking for partition number 2 (your root partition) it doesn't find a second partition.
So humour me and in your fstab give your swap a mount point.
If putting your root partition as /dev/sda2 is the default suggestion, then it's a good idea.
/swap never existed
see : man fstab
Code:
The second field (fs_file).
This field describes the mount point (target) for the filesystem.
For swap partitions, this field should be specified as `none'.
If the name of the mount point contains spaces or tabs these
can be escaped as `\040' and '\011' respectively.
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,018
Rep:
Quote:
Originally Posted by quickbreakfast
...To boot, my machine required a EFI partition, even though it is not used, so your lack of a EFI partition has me asking why it wasn't required.
because VB has nothing to do with bare bone metal EFI requirements of lack of thereof. This is virtual setup. I have VB clients with EFI and without EFI formatted/configured
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.