how do I create a Ubuntu 18.04 boot repair disk?

Asked by paulbenz

Is there a utility available to create an Ubuntu 18.04 boot repair disk in the event my PC will not boot?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
paulbenz
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

The Ubuntu install media can do that. I even think it's an option in GRUB if you select recovery mode on a kernel instead of the normal boot.

Using the live CD/USB desktop you can chroot into the unbootable system and run commands to repair the boot functionality

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

Boot repair works on the boot sector of the disk which is operating system independent.
There is no specific "Ubuntu 18.04 version".

see https://sourceforge.net/p/boot-repair-cd/home/Home/ for instructions how to create a boot repair cd.

Revision history for this message
paulbenz (pbenz54) said :
#3

Update July 3,2018
Thank you for the responses to my question above.
Unfortunately, I do not know how to "Chroot"in the live CD/USB desktop into the unbootable system
What is Chroot and How do I do this?
I ordered Ubuntu 18.04 install DVD two weeks ago, and so far, I am on my 3rd reinstall of the operating system.
I am convinced there are unrevealed problems with 18.04 since it crashed when I clicked on a DVD icon on the desktop
(System kicked out of GUI and into a text recovery command mode)
It happened again last night when I attempted to log into my second user account and the system went from GUI to text recovery mode. In both cases, Ubuntu would not recover, only endless test error messages. The only recourse I had was to reinstall the OS.
I am seriously considering going back to 16.04 until the bugs in the 18.04 distro are corrected

PS will try the boot rescue disk but I have to wonder why I should need to repair a GRUB boot program just because the system crashes or a un -anticipated power loss occurs?????

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

The boot repair disk (and the steps mentioned by actionparsnip) are required if your system does not boot at all (e.g. because of errors in the boot sector, or missing kernel files). What you describe is a different problem, and I do not believe that boot-repair will help in your case at all.

It could be helpful if you are able to read some of these "endless error messages". Maybe they give a hint what's wrong with your system.

I want to recommend that you perform a memtest (from the GRUB menu), just to be sure that this is not the cause.

Revision history for this message
paulbenz (pbenz54) said :
#5

Thank you for your response to my post on July 3
I ran a memory test from GRUB menu and received results
"pass-complete-no errors"
I did make a boot repair disk using Unetbootin utility on a 16GB flash driive.
and ran "check disk" and everything checked out okay
I then removed the USB flash drive and attempted to reboot the Ubuntu 18.04 on the HD but it went to the Ubuntu recovery screen
Neither recovery option worked.
I then reinstalled USB flash drive and booted to Ubuntu 18.04 live and attempted to do Ubuntu 18.04 reinstall.
The third screen took me to the"Installation Type Window" and when I clicked on "install now"
I received an error message "no root file system found".
I was going to do a manual partition of the HD, selecting 16GB for Swap drive and the rest for"/"root drive ( which would include my /home drive ( two partition). However, every thing is greyed out and there is no way to select anything. My situation is very similar to this lady's problem on her laptop and she posted this videl
https://www.youtube.com/watch?v=oWgxpD0SgXI. Any idea what could be wrong and what I need to do to correct this.
thanks for all your help!
Paul Benz

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

In the "manual partitioning" step, do you have an empty window (as seen on the video that you linked), or do you see a line saying "/dev/sda" (or something similar) in the partitioning window?

If you just want to have all disk space used as root file system except an additional swap partition, you could use the automatic partitioning. This allocates space in the recommended amounts.

Revision history for this message
paulbenz (pbenz54) said :
#7

I have the same empty window as seen in the video. There are now no choices given to do an automatic partioning of the HD.
In the"Installation Type Window" at the top of the screen, there are boxes for
Device,Type, MountPoint,Format,Size,Used,System.
At the bottom of the screen there is a + box and - box and "Change"button and a drop down menu with only one selection filled in
dev/sda/ which is the device for boot loader installation.
at the lower right there are three box choices, "Quit, "Back" and "Install Now"
When I click on "Install Now" I get the same error message " No root files found" as the video.
The problem is the menu does not give me choices in order to manually partition the hard disk
I never found a response to the question the lady poised in her 2015 video and was hoping someone might have an answer
thank you,
Paul Benz

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

ok, understood. Apparently the installer does not correctly identify the hard disk.

I have no idea what the reason might be for that. I can give some suggestions. Maybe one of the steps helps identifying the cause.

Can you boot the installer in the "Try Ubuntu without installing" mode, open a terminal window and copy/paste the output that you receive for the commands

sudo lshw -C disk
sudo fdisk -l

Revision history for this message
paulbenz (pbenz54) said :
#9

Here is the results for sudo lshw -C disk:
ubuntu@ubuntu:~$ sudo lshw -C disk
  *-disk:0
       description: SCSI Disk
       product: MHS
       vendor: Sony
       physical id: 0.0.0
       bus info: scsi@5:0.0.0
       logical name: /dev/sdc
       version: 1.00
       size: 3532MiB (3703MB)
       capabilities: removable
       configuration: logicalsectorsize=512 sectorsize=512
     *-medium
          physical id: 0
          logical name: /dev/sdc
          size: 3532MiB (3703MB)
          capabilities: partitioned partitioned:dos
  *-disk:1
       description: SCSI Disk
       product: MHS
       vendor: Sony
       physical id: 0.0.1
       bus info: scsi@5:0.0.1
       logical name: /dev/sdd
       version: 1.00
       size: 284MiB (297MB)
       capabilities: removable
       configuration: logicalsectorsize=512 sectorsize=512
     *-medium
          physical id: 0
          logical name: /dev/sdd
          size: 284MiB (297MB)
          capabilities: partitioned partitioned:dos
  *-disk
       description: SCSI Disk
       product: Cruzer Glide
       vendor: SanDisk
       physical id: 0.0.0
       bus info: scsi@4:0.0.0
       logical name: /dev/sdb
       version: 1.00
       serial: 4C530001110507114162
       size: 14GiB (15GB)
       capabilities: removable
       configuration: ansiversion=6 logicalsectorsize=512 sectorsize=512
     *-medium
          physical id: 0
          logical name: /dev/sdb
          size: 14GiB (15GB)
          capabilities: partitioned partitioned:dos
  *-cdrom
       description: DVD-RAM writer
       product: DVD-RW DVR-219L
       vendor: PIONEER
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/cdrw
       logical name: /dev/dvd
       logical name: /dev/dvdrw
       logical name: /dev/sr0
       version: 1.02
       capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
       configuration: ansiversion=5 status=nodisc
  *-disk
       description: SCSI Disk
       physical id: 0.0.0
       bus info: scsi@1:0.0.0
       logical name: /dev/sda
       configuration: logicalsectorsize=512 sectorsize=4096

Revision history for this message
paulbenz (pbenz54) said :
#10

Here is the results of Sudo fdisk -l:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/loop0: 1.7 GiB, 1831378944 bytes, 3576912 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

Disk /dev/loop1: 86.6 MiB, 90759168 bytes, 177264 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

Disk /dev/loop2: 140 MiB, 146841600 bytes, 286800 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

Disk /dev/loop3: 1.6 MiB, 1691648 bytes, 3304 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

Disk /dev/loop4: 12.2 MiB, 12804096 bytes, 25008 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

Disk /dev/loop5: 21 MiB, 22003712 bytes, 42976 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

Disk /dev/loop6: 3.3 MiB, 3411968 bytes, 6664 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

Disk /dev/sdb: 14.6 GiB, 15664676864 bytes, 30595072 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: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 30595071 30593024 14.6G c W95 FAT32 (LBA)

Disk /dev/sdc: 961 MiB, 1007681536 bytes, 1968128 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: 0x6f20736b

Device Boot Start End Sectors Size Id Type
/dev/sdc1 778135908 1919645538 1141509631 544.3G 72 unknown
/dev/sdc2 168689522 2104717761 1936028240 923.2G 65 Novell Netware 386
/dev/sdc3 1869881465 3805909656 1936028192 923.2G 79 unknown
/dev/sdc4 0 3637226495 3637226496 1.7T d unknown

Partition table entries are not in disk order.

Revision history for this message
paulbenz (pbenz54) said :
#11

When I generated this report, my machine had a 1GB flash drive connected and I was running Ubuntu live from a 16G San Disk Drive
I also have a 16X DVD drive and my hard drive is 1 Tera byte(1000GB) in size.
Finally, my DDR3 Ram is (2) modules 4GB in size for total of 8GB RAM

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

I am sorry to say, but I do not understand what there is happening on your system.

In comment #10 /dev/sdc is 3.5GB
       logical name: /dev/sdc
       size: 3532MiB (3703MB)

but in comment #12 /dev/sdc is 1TB
Disk /dev/sdc: 961 MiB, 1007681536 bytes, 1968128 sectors

This is inconsistent.

Revision history for this message
paulbenz (pbenz54) said :
#13

Thank you for your reponse.
I see the readout from sudo fdisk -1: for the hard disk you call comment #12

Disk /dev/sdc: 961 MiB, 1007681536 bytes, 1968128 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: 0x6f20736b

Are you comparing this to the reading for -disk 0, the first item
when the command sudo lshw -C is issued and which you call comment #10:

ubuntu@ubuntu:~$ sudo lshw -C disk
  *-disk:0
       description: SCSI Disk
       product: MHS
       vendor: Sony
       physical id: 0.0.0
       bus info: scsi@5:0.0.0
       logical name: /dev/sdc
       version: 1.00
       size: 3532MiB (3703MB)
       capabilities: removable
       configuration: logicalsectorsize=512 sectorsize=512
     *-medium
          physical id: 0
          logical name: /dev/sdc
          size: 3532MiB (3703MB)
          capabilities: partitioned partitioned:dos
What would you recommend I do a this point.
Should I reformat the hard drive and start over????
thank you,
Paul Benz

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

Sorry, it seems that I mistyped the comment numbers (should probably have been #9 and #10)

In any case: I do not dare to make any recommendation as long as it is not clear what the name is for the device in question.

Revision history for this message
paulbenz (pbenz54) said :
#15

I removed a flash drive I was using as temporary storage, leaving machine with
1)16GB San disk Ubuntu live flash drive
2) DVD Drive
3) 1 Terabyte HD (1000GB)

Here is what I get when I run list hardware command sudo lshw -Class disk -class storage.
( This command lists all disks and storage controllers in my system)

ubuntu@ubuntu:~$ sudo lshw -class disk -class storage
  *-usb
       description: Mass storage device
       product: Cruzer Glide
       vendor: SanDisk
       physical id: 6
       bus info: usb@2:1.6
       logical name: scsi4
       version: 1.00
       serial: 4C530001110507114162
       capabilities: usb-2.10 scsi emulated scsi-host
       configuration: driver=usb-storage maxpower=224mA speed=480Mbit/s
     *-disk
          description: SCSI Disk
          product: Cruzer Glide
          vendor: SanDisk
          physical id: 0.0.0
          bus info: scsi@4:0.0.0
          logical name: /dev/sdb
          version: 1.00
          serial: 4C530001110507114162
          size: 14GiB (15GB)
          capabilities: removable
          configuration: ansiversion=6 logicalsectorsize=512 sectorsize=512
        *-medium
             physical id: 0
             logical name: /dev/sdb
             size: 14GiB (15GB)
             capabilities: partitioned partitioned:dos
  *-ide:0
       description: IDE interface
       product: 6 Series/C200 Series Chipset Family 4 port SATA IDE Controller
       vendor: Intel Corporation
       physical id: 1f.2
       bus info: pci@0000:00:1f.2
       version: 05
       width: 32 bits
       clock: 66MHz
       capabilities: ide pm bus_master cap_list
       configuration: driver=ata_piix latency=0
       resources: irq:19 ioport:1f0(size=8) ioport:3f6 ioport:170(size=8) ioport:376 ioport:f0d0(size=16) ioport:f0c0(size=16)
  *-ide:1
       description: IDE interface
       product: 6 Series/C200 Series Chipset Family 2 port SATA IDE Controller
       vendor: Intel Corporation
       physical id: 1f.5
       bus info: pci@0000:00:1f.5
       version: 05
       width: 32 bits
       clock: 66MHz
       capabilities: ide pm bus_master cap_list
       configuration: driver=ata_piix latency=0
       resources: irq:19 ioport:f0b0(size=8) ioport:f0a0(size=4) ioport:f090(size=8) ioport:f080(size=4) ioport:f070(size=16) ioport:f060(size=16)
  *-scsi:0
       physical id: 1
       logical name: scsi0
       capabilities: emulated
     *-cdrom
          description: DVD-RAM writer
          product: DVD-RW DVR-219L
          vendor: PIONEER
          physical id: 0.0.0
          bus info: scsi@0:0.0.0
          logical name: /dev/cdrom
          logical name: /dev/cdrw
          logical name: /dev/dvd
          logical name: /dev/dvdrw
          logical name: /dev/sr0
          version: 1.02
          capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
          configuration: ansiversion=5 status=nodisc
  *-scsi:1
       physical id: 2
       logical name: scsi1
       capabilities: emulated
     *-disk
          description: SCSI Disk
          physical id: 0.0.0
          bus info: scsi@1:0.0.0
          logical name: /dev/sda
          configuration: logicalsectorsize=512 sectorsize=4096

Here is what I get when I run fdisk hardware command: sudo fdisk -l
( This command lists partitioning tables for specifed devices)

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/loop0: 1.7 GiB, 1831378944 bytes, 3576912 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

Disk /dev/loop1: 86.6 MiB, 90759168 bytes, 177264 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

Disk /dev/loop2: 140 MiB, 146841600 bytes, 286800 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

Disk /dev/loop3: 1.6 MiB, 1691648 bytes, 3304 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

Disk /dev/loop4: 12.2 MiB, 12804096 bytes, 25008 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

Disk /dev/loop5: 21 MiB, 22003712 bytes, 42976 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

Disk /dev/loop6: 3.3 MiB, 3411968 bytes, 6664 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

Disk /dev/sdb: 14.6 GiB, 15664676864 bytes, 30595072 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: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 30595071 30593024 14.6G c W95 FAT32 (LBA)

Revision history for this message
Manfred Hampl (m-hampl) said :
#16

It seems that the disk is not correctly identified.

lshw does not show any information about the disk size, and fdisk does not show the disk at all.

I am sorry, but I do not have any idea what the cause could be, or how to correct that.

Revision history for this message
paulbenz (pbenz54) said :
#17

Okay, then it appears I will need to reformat the hard drive.
Isn't this the only way to resolve the issue??????
Once I do this, I will go back to 16.04 and run the updates as I have had no issues with this release
Sorry to say, 18.04 is too unstable and should not be experiencing the crashes I have been seeing.
Extremely disappointed with 18.04

Revision history for this message
paulbenz (pbenz54) said :
#18

Will leave this issue open in case someone else out in the Ubuntu world has some thoughts on what might have happened to my system. Problem was never resolved.

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

Before you blame Ubuntu 18.04 - have you tried a different Ubuntu release, or any other operating system?

If Ubuntu 18.04 is not able to get any details about the disk, then this can have different reasons (among others faulty hardware).

Revision history for this message
paulbenz (pbenz54) said :
#20

I was using Ubuntu 16.04 up until a couple of weeks ago when I decided to go to 18.04 LTS and ordered a DVD install disk from Amazon manufactured by"Linux Freak". My 16.04 was trouble free and I didn't have any problems until I installed and started using Ubuntu 18.04. One time I clicked on the DVD drive and the screen locked and then went into a terminal mode. I was unable to get the thing to power down using the REISUB command to restart a frozen system( p227 Ubuntu unleashed 2016 edition, Mathew Helmke, so I had to doing a reboot by shutting down the machine. It would not reboot, hence my original question on boot repair disk. I ended up reinstalling OS.
After i did the OS reinstall, the screen locked up at the user login screen and the PC once again ended up going into terminal mode. So I had to reinstall the OS once again.
This time at the install screen, I did not get any option to " Erase disk and install Ubuntu 18.04" as in previous install, but i was presented with the disk partitioning screen and the error, "No root file found" which is the 2015 video with the laptop installation, previous link.
When I ran " Sudo Gparted" in terminal screen on Ubuntu live flash drive, all it would show is the DVD drive, identical to which this person had on a Dell laptop( except I have a desktop with 1 TB Western Digital SATA 3 drive
Here is the link to this example

https://askubuntu.com/questions/861404/installation-of-ubuntu-16-04-blocked-cannot-find-hard-disk

So is there anyone in the Ubuntu formum committee with what should be done?
Is there any program available that could restore HD access or do I need to reformat HD?
Thank you
Paul Benz

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

I suggest that you test whether the disk is accessible from any other operating system except Ubuntu 18.04

If you reboot the system and enter BIOS setup, what information do you get there about the 1TB hard disk?

Revision history for this message
paulbenz (pbenz54) said :
#22

You are correct.
I took my 1TB Western Digital HD to a local electronics retailer( Best Buy) and they were unable to get the HD to be recognized when connected into their test setup. So Hard drive is not recognized by Windows or Ubutu.
I think the HD partitioning table must have been corrupted do to my multiple installs of Ubuntu 18.04.
I purchased a new 1TB WD HD and installed in my PC. Then I booted off my 16.04 Ubuntu DVD and installed this OS along with all updates from 16.04 release date to current date.
System appears to be stable and no crashes!
I will go ahead and close this question
Thank you very much for your patience and encouragement!
Paul Benz