LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 05-29-2017, 06:20 PM   #1
rbn14
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Rep: Reputation: 1
mount: can't find /mnt in /etc/fstab


I have 14.2 with root on BTRFS with the generic kernel and grub as a virtual guest on KVM. During boot it get:
Code:
mount: can't find /mnt in /etc/fstab
I'm thinking it has something to do with the initrd but I'm not sure.
 
Old 05-30-2017, 09:07 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Can you post /etc/fstab?
 
Old 05-30-2017, 11:00 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
maybe it - it seeing something that is calling for it to be mounted on /mnt but it is not within the fstab file so it fails to mount then is giving you that message.
 
Old 05-30-2017, 10:21 PM   #4
rbn14
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Keruskerfuerst View Post
Can you post /etc/fstab?
I definitely can but I know I am not trying to mount anything on /mnt myself. Does initrd mount the filesystem to /mnt and the chroot it?
 
Old 05-31-2017, 01:29 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by rbn14 View Post
Does initrd mount the filesystem to /mnt and the chroot it?
If you speak about the installer, the initrd does mount / (of the target system) as /mnt but it doesn't need /etc/fstab as it does that on behalf of root, so there is no need for /etc/fstab. But that should not be your context anyway, as the installer ships only a huge kernel, so I assume that you already installed 14.2 and try to boot it, and that you built the initrd that loads the needed drivers beyond what's buit in the generic kernel. Is that right?

Even in that case I do not understand that message, as I don't see a reason to mount /mnt in the startup process, and if it was the case it would be done as root anyway so you shouldn't get that message, only displayed in case or a non root user.

Elaborating on your context and situation could help understand your issue. I don't understand what you mean with "grub as a virtual guest on KVM", as your Slackware could be a virtual guest, not the boot manager. At the very least we need more information like your grub.cfg and your KVM setting, and the command used to built the initrd.

Last edited by Didier Spaier; 05-31-2017 at 04:58 AM.
 
Old 05-31-2017, 07:39 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
and a peek at your fstab as well. all of the information is helpful and only takes a moment to cat -> select -> copy -> paste -> post (in code tabs)
 
Old 05-31-2017, 05:01 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Didier Spaier View Post
Even in that case I do not understand that message, as I don't see a reason to mount /mnt in the startup process, and if it was the case it would be done as root anyway so you shouldn't get that message, only displayed in case or a non root user.
Just a stab in the dark, because I'm not all that familiar with the initrd process beyond running mkinitrd_command_generator.sh, but if someone were to build an initrd from the installer without using a chroot (if it's even possible), could that lead to the initrd trying to mimic the same conditions (ie, having the root partition mounted to /mnt/)?
 
Old 06-01-2017, 10:48 AM   #8
rbn14
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Didier Spaier View Post
.... I assume that you already installed 14.2 and try to boot it, and that you built the initrd that loads the needed drivers beyond what's buit in the generic kernel. Is that right?
That is correct.
Quote:
Originally Posted by Didier Spaier View Post
Elaborating on your context and situation could help understand your issue. I don't understand what you mean with "grub as a virtual guest on KVM", as your Slackware could be a virtual guest, not the boot manager. At the very least we need more information like your grub.cfg and your KVM setting, and the command used to built the initrd.
I can see how that sounds confusing. I was just trying to explain the setup, which is non-typical as slackware is installed on a kvm virtual guest and I have installed the grub boot loader rather than the default lilo.

I can post the grub.cfg tonight. Initrd was built using:
Code:
mkinitrd -c -k 4.4.14 -f btrfs -r /dev/sda1 -m btrfs -u -o /boot/initrd.gz
Then the init script was patched to fix the error where it ignores the rootflags parameter and then initrd was generated again using:
Code:
mkinitrd -k 4.4.14 -f btrfs -r /dev/sda1 -m btrfs -u -o /boot/initrd.gz
 
Old 06-02-2017, 12:13 AM   #9
rbn14
LQ Newbie
 
Registered: Mar 2009
Posts: 9

Original Poster
Rep: Reputation: 1
So a few more things.
I recognized the line following the mount error from the init script.
Code:
mount: can't find /mnt in /etc/fstab
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
       You can try to fix it. Type 'exit' when things are done.
From the init script:
Code:
mount -o ro,$ROOTFLAGS -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."
So I mounted the filesystem manually and exited
Code:
mount -o ro,subvol=system -t btrfs /dev/sda1 /mnt
exit
and the system continued to boot up fine. I thought maybe I screwed up when I patched the init script to use the rootflags boot option so I hardcoded that into the init script
Code:
mount -o re,subvol=system -t $ROOTFS $ROOTDEV /mnt
rebuilt the initrd, and rebooted. The issue was still there so I went back in and hard coded the entire mount line in the script
Code:
mount -o ro,subvol=system -t btrfs /dev/sda1 /mnt
rebuilt, and rebooted. All booted up fine?! I checked the contents of rootfs and rootdev in /boot/initrd-tree/ and they had all the correct info.

Last edited by rbn14; 06-02-2017 at 12:16 AM.
 
Old 07-31-2017, 06:39 AM   #10
hulahoop
LQ Newbie
 
Registered: Jul 2017
Posts: 19

Rep: Reputation: Disabled
newbie, same problem.

new install 14.2 with btrfs and grub, boots ok.

upgrade to current, still boots ok.

change to generic kernel, won't boot. have to
mount /dev/sda1 /mnt
then exit
to continue booting.

had to follow rbn14's tip
hardcoded into init script
mount -o ro -t btrfs /dev/sda1 /mnt
 
Old 07-31-2017, 08:42 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by hulahoop View Post
newbie, same problem.

new install 14.2 with btrfs and grub, boots ok.

upgrade to current, still boots ok.

change to generic kernel, won't boot. have to
mount /dev/sda1 /mnt
then exit
to continue booting.

had to follow rbn14's tip
hardcoded into init script
mount -o ro -t btrfs /dev/sda1 /mnt
I DO NO THINK Piggy backing is allowed in here. you might want to create your own post for your own problem. 2) include detailed steps you took to swap kernels - including output from same steps - links you might have created too match the new kernel to the fileName that lilo or grub looks at to use to boot.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mount: can't find /mnt in /etc/fstab alberg Slackware - Installation 4 06-26-2016 08:08 AM
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
mount: can't find /dev/hda1 in /etc/fstab or /etc/mtab timalan SUSE / openSUSE 24 08-20-2005 09:41 AM
mount -t //192.168.0.1/mnt /mnt/windows -o password='' generates error broadsoft Linux - Networking 3 08-07-2003 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 09:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration