2

After grub stopped booting my system at all (boot-repair: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map) I installed LILO. I know it's not under active development anymore, but I don't have any other options. I'm just happy I can use my PC.

Anyway, as I said in the title the boot takes about ten minutes (it fills like ten lines of dots before finally booting). Which is something I could live with, but it also makes (sometimes necessary) reboots a pain. I tried the compact option which didn't do anything. Ubuntu is installed on a SSD with EXT4 if that matters.

The Laptop is a Lenovo U410 (https://www.amazon.de/gp/product/B0090K8XZ0/). I removed the two drives (HDD+SSD) with a single SSD a few months ago.

$ sudo fdisk -l
Disk /dev/sda: 489,1 GiB, 525112713216 bytes, 1025610768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaf50d9a7

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1  *          2048 1009117183 1009115136 481,2G 83 Linux
/dev/sda2       1009119230 1025609727   16490498   7,9G  5 Extended
/dev/sda5       1009119232 1025609727   16490496   7,9G 82 Linux swap / Solaris


$ fsck -f /dev/sda1
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 1241359/31539200 files (0.2% non-contiguous), 24634630/126139392 blocks


$ fsck -f /dev/sda2
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
fsck.ext2: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Could this be a zero-length partition?


$ sudo blkid
/dev/sda1: UUID="73439e58-15b3-4949-bdad-1c8b5d0259ae" TYPE="ext4" PTTYPE="dos" PARTUUID="af50d9a7-01"
/dev/sda5: UUID="c9c653a7-716a-4b19-b3b1-b61c0d5a94b8" TYPE="swap" PARTUUID="af50d9a7-05"


$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=73439e58-15b3-4949-bdad-1c8b5d0259ae /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=c9c653a7-716a-4b19-b3b1-b61c0d5a94b8 none            swap    sw              0       0


sudo parted -l
Model: ATA Crucial_CT525MX3 (scsi)
Disk /dev/sda: 525GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system     Flags
 1      1049kB  517GB  517GB   primary   ext4            boot
 2      517GB   525GB  8443MB  extended
 5      517GB   525GB  8443MB  logical   linux-swap(v1)
9
  • 1
    It's silly, but did you run sudo lilo, after adding the compact option to your lilo.conf ?
    – Ravexina
    Apr 9, 2017 at 16:45
  • @Ravexina I did :). From my limited understanding of LILO I also think it shouldn't change much for a SSD, because reads are already pretty fast.
    – Prinzhorn
    Apr 9, 2017 at 16:49
  • 10+ minutes to boot from an SSD?!? That's crazy. It should be 10-15 seconds! It sounds like you've got a disk configuration problem. Edit your question to include the terminal output of sudo fdisk -l and let me take a look. And why would grub be looking on sdb1 for anything? This is the only drive on your system, yes? Do you know how to fsck your drive?
    – heynnema
    Apr 9, 2017 at 17:03
  • @heynnema edited the question. Boot was < 10s with grub before it broke. Yes, there is a single SDD drive and only Ubuntu on it. I'll figure out how to fsck
    – Prinzhorn
    Apr 9, 2017 at 17:07
  • See my partial answer on how to fsck. I'd start thinking along the lines of reinstalling GRUB, and troubleshooting any issues that arrive after that. ps: was that all of the output from fdisk? Did it tell you that you had any misaligned partitions?
    – heynnema
    Apr 9, 2017 at 17:12

2 Answers 2

1

I took the laptop out of the drawer after a while and replugged the SSD and ... that solved the issue. I have no idea why this only affected booting, but in the end it was just a bad connection.

So if you ever have a similar problem, make sure to unplug and replug every single cable.

0

Partial answer... work in progress...

To check the file system on your Ubuntu partition...

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode
  • choose Root access
  • at the # prompt, type sudo fsck -f /dev/sda1
  • repeat the fsck command if there were errors
  • type reboot

Update #1

After having reconfigured your computer from 2 drives (HDD + SSD) to 1 drive (SSD) you'll need to check your BIOS settings to make sure that the master/slave disk/boot devices correctly show only 1 SSD drive (current model) connected to master, and no slave HDD/SSD drives.

Also, when performing a GRUB update (sudo update-grub) make sure the your Ubuntu Live USB is not plugged into a USB port.

Make sure that you've got at least BIOS version 21, by following the steps at https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/ideapad-u-series-laptops/ideapad-u410/solutions/HT070218

8
  • I couldn't get into recovery mode due to the known "error: attempt to read or write outside of disk 'hd0'". I'm currently on a live USB stick. I added the fsck to my question.
    – Prinzhorn
    Apr 9, 2017 at 18:56
  • show me the terminal output of sudo blkid, cat /etc/fstab, and sudo parted -l /dev/sda. Also, tell me your EXACT make/model computer, and what version BIOS you have. Also, assuming that you have a few older kernels laying around, can you boot into recovery mode using an older kernel?
    – heynnema
    Apr 9, 2017 at 20:34
  • I added the infos. I can't check the BIOS version rn because I have to leave now and booted using LILO again. Thank you very much.
    – Prinzhorn
    Apr 10, 2017 at 5:54
  • I couldn't boot older kernels when I tried, I didn't try to boot into recovery though.
    – Prinzhorn
    Apr 10, 2017 at 5:55
  • Ah ha! You had 2 drives in the system, now 1 SSD. Did you change your BIOS and tell it what drives are connected to what port? I'll bet it's still looking for that 2nd drive. Did you also sudo update-grub? That's why it's looking for sdb1, and taking 10 minutes to boot. Lastly, if you also have Windows, you can check your BIOS version, it should be 21, by following the instructions here pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/…
    – heynnema
    Apr 10, 2017 at 14:53

You must log in to answer this question.

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