0

I got a problem with Ubuntu 18.04. It has worked fine all the time, until I had to change the ventilation fan of the desktop. Since I changed the fan, and used spray duster on the CPU and the other parts of the mother board, I git the following message at start-up which stops the system:

attempt to read or write outside of disk hd0 ubuntu

press any key to continue....

There is no chance to do any of the maneuvers that are described in other similar posts here on Stackexchange, and therefore I cannot really do anything with it. However, if I restart again and again, at a certain stage, this warning does not appear and the system boots normally.

Is there some way to work around this occasionally appearing problem, or should I just continue as it is, and restart and restart over and over again till it works? Thanks

UPDATE # 1 after corrections by heynnema.

All disks converted to GPT table. Reinstalled Ubuntu 18.10, but it doesn't start. All Iget is the startup animation of the Ubuntu dots that flash from left to right, without any color in the background or anything happening. Inserting snapshot. enter image description here

Another restart brings the regular Ubuntu background forth, but as the previous case, it just flashes its process lights from left to right. Nothing happens, the system does not start. WHat can I do? Should I go over to another table structure?

UPDATE #2: Updated the BIOS to most recent version. Tried to reinstall Ubuntu by erasing the disk and use LVM set up. Installation stopped when entering the LVM menu to make a boot table. Nothing happens, no buttons work. Before LIVD CD starts fully, it shows a dark screen with white text:

APEI cannot start mem [342423e4dxxx..] or something

the Ubuntu Trial starts then on Live CD and when trying to format the boot drive from LIVE CD In Gparted, the option to format are hidden and cannot be used. Entering Install setup and then at Install options selecting again :

trying now Erase Disk and install Ubuntu as it now says "The computer has not detected operating systems".

Skipping LVM

Installation runs ahead.

Installation failed again. Same screen as depicted above in the image.

  • 1
    Use a liveCD to run fsck on the filesystem to correct it! – George Udosen Mar 14 at 11:58
  • 1
    This is only a suggestion, but have your power supply checked. I was experiencing the same errors and my power supply was bad. It was also giving me issues when I would go to play 3d games that would ramp up the fan on my video card and my system would turn right off without warning. But the boots were showing the same errors and I had to reboot several times. Bad power supplies can cause unpredictable errors and problems. – Terrance Mar 14 at 13:07
  • I just changed the power supply a year ago – user287546 Mar 14 at 17:41
  • I did turn off the computer indeed. All appeared OK, hardware wise. – user287546 Mar 15 at 16:04
1

I've seen complaints of this type of error quite frequently. I've researched all of the various answers, and they're all over the place, with no particular one making much real sense. So I figure that I'll take a crack at it myself :-)

First thing to do is check the filesystem, like so...

  • boot to a Ubuntu Live DVD/USB
  • open a terminal window
  • type sudo fdisk -l
  • identify the /dev/XXXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/XXXX # replacing XXXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot

Next, I want to take a look at how your hard disk is put together. Edit your question to include a screenshot of gparted when looking at your boot disk.

Also show me sudo fdisk -l and sudo blkid and free -h and swapon and cat /etc/fstab and ls -al /boot. I know that's a lot of stuff to do, but we have to start somewhere. Copy/paste the output into an edit of your question, please don't use the comments, or use screenshots. Use the {} icon to help format the text if need be.

Also show me systemctl status ureadahead, and grep -i ureadahead /var/log/syslog*.

Especially because this problem is somewhat intermittent, please understand that this troubleshooting and repair may take some time, so be very patient.

Update #1:

Although I haven't seen all of the information that I've requested, I've seen enough to have some conclusions.

  • all four 1TB disks (sda/b/c/d) are formatted with MBR partition tables. They should be GPT partition tables.

  • sda2 "does not start on physical sector boundary".

  • ureadahead is bombing /var/log/syslog and should be disabled in 18.xx.

  • there's a possibility that some kind of ramdisk software is enabled, as I see many /dev/ramX in sudo fdisk -l. If so, this should be disabled.

What to do?

  • boot to the Ubuntu Live DVD/USB and run memtest for one complete pass

  • backup ALL of your disks

  • make sure that your computer is set to UEFI mode in the BIOS

  • install GPT partition tables on all 4 disks (this will wipe these disks)

  • re-create ext4 partitions on sdb/c/d

  • re-install Ubuntu on sda

  • it looks like you have a 48G swap... that's insane... unless you're hibernating, and then the size needs to be large... make a much smaller swap

  • re-run sudo fdisk -l and confirm that all partitions are aligned

  • disable ureadahead

    • sudo systemctl stop ureadahead

    • sudo systemctl disable ureadahead

  • do not install any ramdisk software, if you had previously

  • restore your data

  • 2
    @user287546 thanks for the info... but as I requested in my answer, please don't use the comments to show me the output of the commands. Copy/paste the complete output, including the commands that you typed, as an edit to your question. Thanks! Also... fsck has to be done from a Ubuntu Live DVD/USB. – heynnema Mar 14 at 15:30
  • 1
    @user287546 although I certainly appreciate your efforts at getting the information to me, you're not following my instructions. Please do NOT post the command output to the comments. Rather copy/paste the ENTIRE command output, including the command itself, as an edit to your original question. Please delete the comments that show command output, and redo the entire chain. Thanks! – heynnema Mar 14 at 17:42
  • 1
    @user287546 Yes, it is a lot of work. But the system wasn't configured for optimum operation in the first place. You've got a lot of expense hardware, and you should be able to get the most out of it. Swapping the fan, or Ubuntu 18.xx, has nothing to do with your current problem(s). – heynnema Mar 14 at 19:08
  • 1
    @user287546 did some/all of my answer make sense to you? Will you be implementing some/all of it? Please keep me posted as to your status, ok? – heynnema Mar 15 at 11:20
  • 1
    Did you make sure to check that your BIOS was set to UEFI mode? – heynnema Mar 15 at 15:18
1

This is probably a problem with your Grub installation. Maybe a badly written file during a hard shutdown (i.e. turning PC off without a real shutdown).

You can try to force rewriting all grub files by reinstalling all Grub packages. Don't remove them and reinstall them. If there is a problem while packages are uninstalled you may not be able to reboot again:

sudo apt-get install --reinstall $(dpkg -l | awk '{ print $2 }' | grep grub)
sudo update-grub

The command "dpkg -l | awk '{ print $2 }' | grep grub" lists your grub related packages. For exemple (on my system):

grub-common
grub-efi-amd64
grub-efi-amd64-bin
grub-efi-amd64-signed
grub-legacy-ec2
grub2-common
  • 1
    @user287546 don't follow two different answers at the same time. It'll really make a mess of things. If you're going to follow my answer, then don't do this now. – heynnema Mar 14 at 15:39
1

I just dug out of one of these problems myself with 5.0.0.27. Running fsck came out with no errors.

I finally booted from a flashdrive, moved /boot/grub/grub.cfg to a backup file and then copied the backup file back to the original name. Did the same thing with /boot/init... file, and /boot/vmlinuz... file. Now my system boots!

My system is installed on a single 4TB partition and I think one of those files was out of reach for grub. Doing the move and copy seems to have put them back where grub can now read them.

I stumbled on this approach when I tried to 'cat /boot/grub/grub.cfg' from within grub and I got the same error about reading outside of hd0. When I booted from the flashdrive I had no problem mounting the /dev/sda2 partition and reading the file. Therefore I knew the file was still intact. That lead me to the thought that grub simply can't handle a 4TB drive if the boot files are "too far away". Maybe for me it's time to make /boot be a separate smaller partition!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.