LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   BOOT ERROR: Mounting on /root failed: Invalid argument (https://www.linuxquestions.org/questions/linux-kernel-70/boot-error-mounting-on-root-failed-invalid-argument-4175524514/)

Prime08 11-06-2014 12:15 AM

BOOT ERROR: Mounting on /root failed: Invalid argument
 
Hi

Evrytime i try to boot my system i get an error message:

mount: mounting /dev/disk/by-uuid/a3c31122-6794-4fa6-a039-91d49dadfa8a on /root
failed: Invalid argument
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have /sbin/init.
No init found. Try passing init = bootarg.

BusyBox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu7) built-in shell (ash)
Enter 'help' for a lit of built in commands.

(initramfs)

I tried to boot using live disk but i can't mount the hdd.

Please help.

Paul

ondoho 11-06-2014 02:19 AM

Quote:

Originally Posted by Prime08 (Post 5265354)
Evrytime i try to boot my system i get an error message:

mount: mounting /dev/disk/by-uuid/a3c31122-6794-4fa6-a039-91d49dadfa8a on /root
failed: Invalid argument

the explanation is right there.
the uuid is a universal identifier for your hard drive, the one you installed your linux on.
mount cannot find it. the uuid is wrong.
it's hard to say more about this now, but i guess it's safe to say that something went wrong with your install.

Quote:

I tried to boot using live disk but i can't mount the hdd.
this doesn't make sense. booting a live medium, you don't need the hard drive.

Prime08 11-06-2014 05:09 AM

Thanks for the reply Ondoho.

It seems I was a bit unclear.
What i meant to say was i tried booting fron a Live CD but i cant seem to mount the boot partition or any other partitions on my device. Its write protected.

i was hoping to fix grub2 but i get an "access denied" response.

What do i do?

RockDoctor 11-06-2014 09:15 AM

I'd unmount the hdd partition of interest, run fsck on it, then try remounting it. If that didn't allow you to mount the partition writably, and I was feeling brave (or is that foolish?) I'd try to forcibly mount it rw.

Prime08 11-06-2014 09:26 AM

I ran fsck and this is the output
Code:

root@ubuntu:~# fsck /dev/sda1
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
fsck.ext4: Read-only file system while trying to open /dev/sda1
Disk write-protected; use the -n option to do a read-only
check of the device.


RockDoctor 11-06-2014 09:35 AM

In that case, I'd do the read-only check first. If that looks good, I'd try the remount option.
Code:

mount -o remount,rw /dev/sda1 <mountpoint>

Prime08 11-06-2014 10:02 AM

okay. how do i specify the filesystem type?

Code:

root@ubuntu:~# fsck -n /dev/sda1
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/sda1: clean, 256277/848640 files, 3146660/3393792 blocks
root@ubuntu:~# mount -o remount,rw /dev/sda1 /mnt
mount: you must specify the filesystem type
root@ubuntu:~#


RockDoctor 11-06-2014 10:10 AM

Code:

man fsck
is your friend. If it's an ext4 filesystem, you can use fsck -t <filesystem-type> or fsck.ext4

Prime08 11-06-2014 11:18 AM

Still not working.
Code:

root@ubuntu:~# fsck.ext4 /dev/sdb1
e2fsck 1.42.9 (4-Feb-2014)
fsck.ext4: Read-only file system while trying to open /dev/sdb1
Disk write-protected; use the -n option to do a read-only
check of the device.
root@ubuntu:~# fsck -t ext4 /dev/sdb1
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
fsck.ext4: Read-only file system while trying to open /dev/sdb1
Disk write-protected; use the -n option to do a read-only
check of the device.
root@ubuntu:~#


ondoho 11-06-2014 12:52 PM

the problem you are experiencing, is this on an installed version of ubuntu or while booting a live medium?

also, your filesystem magically moved from sda1 to sdb1, how's that happened?

and, i'll say it again, a live medium should just boot up to a graphical desktop, no matter what state your hard drive is in.

somehow i have the suspicion that you haven't even installed ubuntu yet and are trying to run a fsck on the live medium, which is by all rights read only.

Prime08 11-06-2014 01:42 PM

Quote:

Originally Posted by ondoho (Post 5265693)
the problem you are experiencing, is this on an installed version of ubuntu or while booting a live medium?

also, your filesystem magically moved from sda1 to sdb1, how's that happened?

and, i'll say it again, a live medium should just boot up to a graphical desktop, no matter what state your hard drive is in.

somehow i have the suspicion that you haven't even installed ubuntu yet and are trying to run a fsck on the live medium, which is by all rights read only.

Let me explain what happened.

I had installed ubuntu 14.04 lts a while back. whn i tried to boot yesterday i got the error. I then booted from a LiveCD so i can search online for a solution. After reading a few threads i learnt the solution would be to reinstall Grub2.

Now in order to reinstall grub2 i had to mount the boot partition.
Code:

root@ubuntu:~# mount /dev/sdb1 /mnt
mount: block device /dev/sdb1 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

root@ubuntu:~#

And the reason why the device is now sdb from sda is simply because i turned the laptop off and left the house, and when i rebooted from LiveCD i had connected a flash drive wich was now sda.

RockDoctor 11-07-2014 08:48 AM

Quote:

Originally Posted by Prime08 (Post 5265638)
Still not working.
Code:

root@ubuntu:~# fsck.ext4 /dev/sdb1
e2fsck 1.42.9 (4-Feb-2014)
fsck.ext4: Read-only file system while trying to open /dev/sdb1
Disk write-protected; use the -n option to do a read-only
check of the device.
root@ubuntu:~# fsck -t ext4 /dev/sdb1
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
fsck.ext4: Read-only file system while trying to open /dev/sdb1
Disk write-protected; use the -n option to do a read-only
check of the device.
root@ubuntu:~#


Have you tried running a check on your boot partition?
Code:

fsck -n -t ext4 /dev/sdb1


All times are GMT -5. The time now is 02:46 PM.