LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-10-2014, 01:52 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
boot message: mount: mounting /dev/sda1 on /mnt failed: Invalid argument.


Hi: I created partition 6 and moved slackware 14.0-32, which was in partition 1 to partition 6. Then I modified lilo.conf and fstab and ran lilo. Maybe I modified the fstab that was in 1 instead of that of 6, do not remember well. When I booted slackware everything went well. Then I deleted partition 1 and booted again. But this time, during booting, I got the message in the thread title followed by "ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead. You can try to fix it. Type 'exit' when things are done". And was given a prompt.

Now, why is the system trying to mount /dev/sda1? I can't understand. How does it know the O.S. was in /dev/sda1 before?
 
Old 10-10-2014, 02:03 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
Because you still told to mount /dev/sda1 on / in the /etc/fstab found on your new root file system (mounted on /dev/sda6), as this is not the file that you have edited. So the system looks for /sbin/init on /dev/sda1 but when it does so /dev/sda1 is not yet mounted.

So no, the system doesn't not "know" that /dev/sda1 was the old root device, it just reads /etc/fstab to know what the root device is, as it should.

Last edited by Didier Spaier; 10-10-2014 at 02:10 PM.
 
Old 10-10-2014, 02:14 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
But in sda6/etc/fstab I tell it it's sda6! The /etc/fstab in sda6 now says:

/dev/sda6 / ext2 defaults 1 1

I don't know how to make the system forget about sda1!
 
Old 10-10-2014, 02:18 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
That would mean that the lilo stanza you use still has
Code:
root = /dev/sda1

Last edited by Didier Spaier; 10-10-2014 at 02:20 PM.
 
Old 10-10-2014, 02:20 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Apparently. But I ran lilo with boot=/dev/sda6 and root=/dev/sda6.
 
Old 10-10-2014, 03:01 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
All of a sudden I understood what is happening. When linux was in sda1 the boot loader was in the MBR (disk absolute sector 0). I had root=/dev/sda in lilo.conf. Then I move it to sda6 and changed that line to root=/dev/sda6. But BIOS was still loading the boot loader from the MBR! What I did now is to run lilo with the old line root=/dev/sda and the system boot OK.

However, the only way I had found to be able to boot windows 7, which I have in partitions 2 and 3, was to have root=/dev/sda6 (root=/dev/sda1 before moving linux). With root=/dev/sda I get "bootmgr is missing" when booting win 7.
 
Old 10-10-2014, 03:10 PM   #7
thirdm
Member
 
Registered: May 2013
Location: Massachusetts
Distribution: Slackware, NetBSD, Debian, 9front
Posts: 316

Rep: Reputation: Disabled
Quote:
Originally Posted by stf92 View Post
All of a sudden I understood what is happening. When linux was in sda1 the boot loader was in the MBR (disk absolute sector 0). I had root=/dev/sda in lilo.conf. Then I move it to sda6 and changed that line to root=/dev/sda6. But BIOS was still loading the boot loader from the MBR! What I did now is to run lilo with the old line root=/dev/sda and the system boot OK.
I'm confused. Do you mean root= or boot= above? Cause according to the man page it's boot= that says where to put the boot loader and root= is just a way to pass along the kernel command line parameter of that name to linux.
 
Old 10-10-2014, 03:51 PM   #8
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I had linux in sda1 and boot=/dev/sda (sic). Then I installed windows 7 and couldn't make lilo boot it until I happened to put boot=/dev/sda1. Then I created partition 6 and moved linux to it, with boot still equal boot=/dev/sda6. And here is where I got "mount: mounting /dev/sda1 on /mnt failed" at boot time and could boot linux no longer. Then I put boot=/dev/sda and I could boot well. That's all I can say. Of course root= was modified where appropriate.

EDIT: my mistake. In post #6 it should say 'boot=' and not 'root='.

Last edited by stf92; 10-10-2014 at 04:05 PM.
 
  


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
mount /dev/md9 /mnt/disk/ -(Invalid Argument) Train Linux - Server 2 04-28-2014 03:58 PM
Trying to Mount USB mounting /dev/sda1 on /mnt/usb failed: Invalid argument JamesMore Linux - Newbie 9 07-28-2010 03:27 PM
message sending failed : Error[22 ] invalid argument .....but each and every argument rakeshranjanjha Linux - Software 2 01-07-2008 11:22 PM
mount: Mounting /dev/sda2 on /mnt failed: Invalid argument dohpaz Slackware 7 05-25-2007 02:03 AM
installation Error mounting sda1: Invalid Argument sadirmata Linux - Software 4 01-31-2002 10:37 AM

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

All times are GMT -5. The time now is 08:12 AM.

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