5

I recently installed the latest version of UBUNTU onto my laptop and having a slight issue during boot-up.

During boot up I get the following error:

Serious errors were found while checking the disk drive for /.

After doing some research on here, I have been able to fix the problem and get UBUNTU to boot just fine after I go into GRUB boot entry and RO to RW. For example;

RO:

linux   /boot/vmlinuz-3.13.0-24-generic root=UUID=AAC884AC1F144321 loop=/ubuntu/disks/root.disk **ro**   quiet splash $vt_handoff

RW:

linux   /boot/vmlinuz-3.13.0-24-generic root=UUID=AAC884AC1F144321 loop=/ubuntu/disks/root.disk **rw**   quiet splash $vt_handoff

How can I permanently edit this, so that I no longer after edit this EVERY time I boot-up. I greatly appreciate any help. I am a total noob with this OS!

1
  • /boot/grub/grub.conf or /boot/grub2/grub.cfg whichever exists. May 18, 2014 at 20:59

3 Answers 3

5

To answer your question literally: edit /etc/grub.d/10_linux and change ro to rw, then run sudo update-grub. This regenerates the file /boot/grub/grub.cfg which is used at boot time.

But don't do this! ro is the right setting. Changing ro to rw cannot help. Your problem was not solved by changing the boot option, it was solved by running fsck. Now that this is done, the filesystem is usable again.

Filesystem corruption isn't supposed to happen. You should look for the cause of the corruption. This could be a memory problem; run a memory test (select “memory test” at the Grub prompt and leave it running for at least one full pass, e.g. overnight).

4
  • Thank you for your help! So you are saying not to change ro to rw? Instead, run the memory test? I just want to clarify.
    – user282940
    May 18, 2014 at 21:43
  • Isn't this a documented bug in 14.04? I did this on two computers (without running fsck) and it worked.
    – jaia
    Aug 15, 2014 at 17:32
  • 1
    @jaia Is what a documented bug? You did what? I do confirm that the Grub line should contain ro, not rw. Aug 15, 2014 at 17:42
  • The problem the OP reports is fairly common with 14.04 and changing ro to rw is a useful workaround. bugs.launchpad.net/wubi/+bug/1313396 There's no filesystem corruption involved.
    – jaia
    Aug 16, 2014 at 4:07
1

You do not want to edit your GRUB to permanently change ro to rw. You will render some of your recovery options inoperable. If you ever need one of them you might run into problems. A better approach is to edit the /usr/share/initramfs-tools/scripts/local file and modify a line in that file. If you have changed your 10_lupin or 10_linux files, you will need to revert your changes before doing what follows.

  1. Open in your favorite editor as root superuser your /usr/share/initramfs-tools/scripts/local file. Look for the line that reads as follows:

    mount ${roflag} -o loop -t ${FSTYPE} ${LOOPFLAGS} "/host/${LOOP#/}" ${rootmnt}
    
  2. Comment out that line and add the following three lines below that line (make sure they line up with the above line you have commented out):

    loopdev=`losetup -f`
    losetup ${loopdev} "/host/${LOOP#/}"
    mount ${roflag} -t ${FSTYPE} ${LOOPFLAGS} ${loopdev} ${rootmnt}
    
  3. Save the file and run in a terminal:

    sudo update-grub
    

After that, you can reboot your system and you should be good to go whenever kernel updates come around, and you will be able to use recovery options as they should be used. Make sure to make a backup of the edited file in case an upgrade removes your changes. That way, if an upgrade manages to break your changes, you can copy the modified lines in the backed up file and place them in the proper location.

2
  • @d-charles-pyle What does, " If you have changed your 10_lupin or 10_linux files, you will need to revert your changes before doing what follows." mean? (Can you elaborate, please?) Aug 2, 2015 at 10:07
  • Sorry, for some reason did not see the notification for this question. If you changed your two files mentioned above, you would need to revert them to their previous state before editing and following my answer for the above issue. It also should be noted that you should make a backup of the file actually needing editing. A recent update to 14.04.4 from 14.04.3 actually broke this again, requiring my re-editing the file. Feb 28, 2016 at 3:40
0

What I have done is:

  • mounted root.disk to /dev/1
  • modified ro to rw in /dev/1/boot/grub/grub.cfg
  • reboot
  • successfully loaded Ubuntu

Details:

sudo mkdir /dev/1
sudo mount -t ext4 -o loop /host/ubuntu/disks/root.disk /dev/1
sudo vi /dev/1/boot/grub/grb.cfg

replace the ro to rw in lines which looks like

linux /vmlinuz-2.6.28-13-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro  quiet splash

to

linux /vmlinuz-2.6.28-13-generic root=UUID=9018bfe2-9de3-4692-9883-fc2f875e6455 ro  quiet splash
  • save using wq!
  • reboot
1
  • The two files I mentioned (located in /etc/grub.d) are the ones wherein a change is made that won't be overwritten the next time you run update-grub or every time you have a kernel update. If you leave the ro as rw in your grub.cfg file, you will have errors and recovery failures crop up when you try to use some of the recovery options in future, as you will if the two files mentioned above are edited. Try running in recovery mode and using some of those options and you will see what I mean. If you do as I have suggested above, you get no errors and no issues booting. Aug 3, 2015 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .