PDA

View Full Version : [ubuntu] 17.04 install to USB pen drive fails to load GRUB



tracyspda
May 18th, 2017, 02:26 PM
Let me begin by saying that I am a complete newbie to Ubuntu. So I may need explanations on even simple things. I am working on reading through the "sticky" post at the top of this section, but I'm finding it rough going as I don't know much (tempted to say nothing) about *nix. As I have time to try things I find in there, I will follow-up my post here...


I am trying to install Ubuntu 17.04 on a USB pen drive. I have successfully downloaded the Live CD image, and loaded that onto a USB pen drive. It boots and runs with no problems. However, when I try to do a persistent install to a (different) USB pen drive, the install apparently succeeds, but the persistent install will not boot. Attempting to boot leads to a blank (black, with backlight on) screen.


I have tried to load the GRUB menu by pressing multiple times, and by holding down, the Shift key during boot. Pressing multiple times gives me no results. Holding down the Shift key leads to a message "GRUB loading." on a black screen, but it never reaches the GRUB menu.


I have tried booting the Live CD image and modifying the persistent install version of /etc/default/grub to include the "nomodeset" option. This produces no change in the situation.


I have tried this process with two different pen drives (one is a Toshiba 32 GB drive, the other is a SanDisk 8 GB drive). Both with the same outcome.


I have tried zeroing out the USB media completely (sudo dd if=/dev/zero of=/dev/sdd) and repeated the install. Same results.


The computer being used is an HP Pavillion DV7 (LM726AV) system, currently with no operating system on the installed hard drive (internal hard drive has failed SMART testing, and all partitions have been removed using gparted). The BIOS is by Insyde, and is version F.1B. The boot sequence has been set to first try booting the USB pen drive. If there are other BIOS settings of interest, please ask.


Suggestions on how to proceed from this point?

oldfred
May 18th, 2017, 04:55 PM
Is this an UEFI system or a BIOS based system?
And if UEFI are in installing in UEFI or BIOS boot mode?
How you boot install media is how it installs.

If installing from one USB to another that is normally a full install.
The live installer with additional space is a persistent install.
https://wiki.ubuntu.com/LiveUsbPendrivePersistent


Pros & cons of persistence install over direct install to flashdrives - C.S.Cameron
http://ubuntuforums.org/showthread.php?t=2133067
http://ubuntuforums.org/showthread.php?t=1655412

If UEFI install you have to partition in advance and must have an ESP - efi system partition on drive seen as sda. Grub in UEFI mode only installs to ESP on sda.
If full BIOS install, during Something Else install and partitioning you need to specify which drive to install grub boot loader into. All default installs install grub to drive seen as sda.

Post this:
sudo parted -l

tracyspda
May 18th, 2017, 05:50 PM
This is a BIOS system, no UEFI available.

Sorry if my terminology is inaccurate. I am attempting to do a full install (to produce a working system with persistence of settings and the ability to install software, etc).

I booting the Live CD image from a USB flash drive (/dev/ssc) and installing to a USB flash drive (/dev/ssd).

For each install attempt, I did the "something else" option, created the install partition as an ext4 partition mounted as / and set the boot manager to install to the ssd (USB flash drive install target) drive.

I am not at the system right now to post the output of sudo parted -l command. I will post that this evening when I get home from work.

(Posted from an android phone, so if any auto-correct errors exist, I will fix them when I am at home)

oldfred
May 18th, 2017, 06:00 PM
That install procedure sounds correct.
You do have to then set BIOS to boot USB flash drive first. And remove installer flash drive.
My systems saw USB flash drives as another hard drive, not as any of many USB boot options.

tracyspda
May 18th, 2017, 09:07 PM
My boot order is set as:

USB flash drive/USB hard drive
Internal CD-ROM drive
Internal hard drive

Each time I tried to boot the install on the UDB drive, I did remove the Live CD USB, otherwise I couldn't be sure which one would be picked by the BIOS for booting.

I did find reference (in one of the sticky posts) to a procedure to "force" the GRUB menu. I plan to try that tonight and see where (if anywhere) that gets me.

oldfred
May 18th, 2017, 11:10 PM
I had a USB hard drive, USB floppy drive, USB CD/DVD and others. None worked.

But then under internal drive drive was a > and two drives, my real internal drive and the flash drive.

tracyspda
May 18th, 2017, 11:14 PM
All of the ones I have used (including the one with the Live CD image) show up under the booted Live CD as /dev/ssX drives. I will look at the parted -l output tonight and see how they are being detected.

tracyspda
May 19th, 2017, 02:10 AM
Here's the output of parted -l


ubuntu@ubuntu:~$ sudo parted -l
Model: ATA Hitachi HTS72757 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags


Model: ATA Hitachi HTS72757 (scsi)
Disk /dev/sdb: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 750GB 750GB primary ntfs


Model: SanDisk Cruzer U (scsi)
Disk /dev/sdc: 8004MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 8004MB 8003MB primary fat32 boot, lba


Model: TOSHIBA TransMemory (scsi)
Disk /dev/sdd: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 10.0GB 9999MB primary ext4 boot


ubuntu@ubuntu:~$


I don't see anything that looks out of the ordinary - in this list /dev/sdc is the Live CD image, and /dev/sdd is the installed copy.

tracyspda
May 19th, 2017, 03:21 AM
So, I followed the directions for "forcing" the GRUB menu found here:

https://ubuntuforums.org/showthread.php?t=1743535&page=80&p=11469860#post11469860

No change in the situation (booting normally produces a blank (black, with backlight) screen, and booting with Shift produces "GRUB loading." and never proceeds from there.

Still not sure what to do to remedy this. Open to any suggestions....

oldfred
May 19th, 2017, 04:32 AM
What video card/chip does your HP have?
Does recovery mode boot, second line in grub menu.
Are you installing Ubuntu or Lubuntu. If older system or limited RAM Lubuntu may be better choice. And also lighter weight gui often a bit faster on flash drive.

From Ubuntu installer add the Boot-Repair ppa and post link to Summary Report.
May be best to see details, you can run from Ubuntu live installer or any working install, use ppa version not ISO:
Post the link to the Create BootInfo summary report. Is part of Boot-Repair:
https://help.ubuntu.com/community/Boot-Info and:
https://sourceforge.net/p/boot-repair/home/Home/

tracyspda
May 20th, 2017, 02:56 AM
The video card is an Intel Integrated Graphics Controller. I can look into the chipset info, if that is needed.

None of the options available from GRUB will boot, because GRUB never loads sufficiently to give me any options.

I am installing Ubuntu, from a Live CD image on USB Flash. The install set is: ubuntu-17.04-desktop-amd64.iso

I was able to get boot-info installed and running, but I wasn't able to get it to give me an online URL, despite being online at the time. So pasted below is the output. I don't see anything that looks out of the ordinary to me, but then I don't know *nix so something out of the ordinary might not be obvious to me. It should be noted that I have replaced the failed primary hard drive with an SSD drive, and I'm going to install Windows 10 and possibly Ubuntu onto that drive. But I do still want to get the USB install running, in case something happens and I need a bootable system that I can use for day to day work while I fix the next problem...


Boot Info Script cfd9efe + Boot-Repair extra info [Boot-Info 26Apr2016]


============================= Boot Info Summary: ===============================

=> No boot loader is installed in the MBR of /dev/sda.
=> Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for /boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk search_fs_uuid
---------------------------------------------------------------------------

config script
---------------------------------------------------------------------------
search.fs_uuid 8269207f-8723-4632-9933-dd3d30d899c7 root hd3,msdos1
set prefix=($root)'/boot/grub'

---------------------------------------------------------------------------
=> Syslinux MBR (5.00 and higher) is installed in the MBR of /dev/sdc.
=> Grub2 (v2.00) is installed in the MBR of /dev/sdd and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos1)/boot/grub. It also embeds following components:

modules
---------------------------------------------------------------------------
fshelp ext2 part_msdos biosdisk
---------------------------------------------------------------------------

sdb1: __________________________________________________ ________________________

File system: ntfs
Boot sector type: Windows 7/2008: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:

sdc1: __________________________________________________ ________________________

File system: vfat
Boot sector type: SYSLINUX 6.03
Boot sector info: Syslinux looks at sector 32792 of /dev/sdc1 for its
second stage. The integrity check of Syslinux failed.
No errors found in the Boot Parameter Block.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux.cfg /casper/vmlinuz.efi
/EFI/BOOT/grubx64.efi /ldlinux.sys

sdd1: __________________________________________________ ________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 17.04
Boot files: /boot/grub/grub.cfg /etc/fstab
/boot/grub/i386-pc/core.img

============================ Drive/Partition Info: =============================

Drive: sda __________________________________________________ ___________________
Disk /dev/sda: 978.1 GiB, 1050214588416 bytes, 2051200368 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

Partition Boot Start Sector End Sector # of Sectors Id System

Invalid MBR Signature found.


Drive: sdb __________________________________________________ ___________________
Disk /dev/sdb: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdb1 2,048 1,465,145,343 1,465,143,296 7 NTFS / exFAT / HPFS


Drive: sdc __________________________________________________ ___________________
Disk /dev/sdc: 7.5 GiB, 8004304896 bytes, 15633408 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

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdc1 * 2,048 15,633,407 15,631,360 c W95 FAT32 (LBA)


Drive: sdd __________________________________________________ ___________________
Disk /dev/sdd: 28.9 GiB, 31024349184 bytes, 60594432 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

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sdd1 * 2,048 19,531,775 19,529,728 83 Linux


"blkid" output: __________________________________________________ ______________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sdb1 0CA0E4B7A0E4A902 ntfs Drive_2
/dev/sdc1 B6AB-BB7C vfat UBUNTU 17_0
/dev/sdd1 55d7266e-85d5-4686-ab20-73d74b6ed330 ext4

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root 9 May 20 01:30 ata-Crucial_CT1050MX300SSD1_1712166374B3 -> ../../sda
lrwxrwxrwx 1 root root 9 May 20 01:30 ata-Hitachi_HTS727575A9E364_J3740084HE64BE -> ../../sdb
lrwxrwxrwx 1 root root 10 May 20 01:30 ata-Hitachi_HTS727575A9E364_J3740084HE64BE-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 May 20 01:28 ata-hp_BDDVDRW_CT30K_KVAB7BF1856 -> ../../sr0
lrwxrwxrwx 1 root root 9 May 20 01:30 usb-SanDisk_Cruzer_U_20052845220C8D627E1E-0:0 -> ../../sdc
lrwxrwxrwx 1 root root 10 May 20 01:30 usb-SanDisk_Cruzer_U_20052845220C8D627E1E-0:0-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 May 20 01:30 usb-TOSHIBA_TransMemory_73D60857E828CEB0FC19E22D-0:0 -> ../../sdd
lrwxrwxrwx 1 root root 10 May 20 01:30 usb-TOSHIBA_TransMemory_73D60857E828CEB0FC19E22D-0:0-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 9 May 20 01:30 wwn-0x5000cca68cd41761 -> ../../sdb
lrwxrwxrwx 1 root root 10 May 20 01:30 wwn-0x5000cca68cd41761-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 May 20 01:30 wwn-0x500a0751166374b3 -> ../../sda

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sdc1 /cdrom vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,ioc harset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdd1 /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330 ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udi sks2)


=========================== sdc1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------

if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash ---
initrd /casper/initrd.lz
}
menuentry "Install Ubuntu" {
set gfxpayload=keep
linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash ---
initrd /casper/initrd.lz
}
menuentry "OEM install (for manufacturers)" {
set gfxpayload=keep
linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash oem-config/enable=true ---
initrd /casper/initrd.lz
}
menuentry "Check disc for defects" {
set gfxpayload=keep
linux /casper/vmlinuz.efi boot=casper integrity-check quiet splash ---
initrd /casper/initrd.lz
}
--------------------------------------------------------------------------------

============================== sdc1/syslinux.cfg: ==============================

--------------------------------------------------------------------------------
DEFAULT loadconfig

LABEL loadconfig
CONFIG /isolinux/isolinux.cfg
APPEND /isolinux/
--------------------------------------------------------------------------------

=================== sdc1: Location of files loaded by Grub: ====================

GiB - GB File Fragment(s)

?? = ?? boot/grub/grub.cfg 1

================= sdc1: Location of files loaded by Syslinux: ==================

GiB - GB File Fragment(s)

?? = ?? syslinux.cfg 1
?? = ?? ldlinux.sys 1

=========================== sdd1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 0 ; then
set timeout=0
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-55d7266e-85d5-4686-ab20-73d74b6ed330' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=55d7266e-85d5-4686-ab20-73d74b6ed330 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-19-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-55d7266e-85d5-4686-ab20-73d74b6ed330' {
menuentry 'Ubuntu, with Linux 4.10.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-advanced-55d7266e-85d5-4686-ab20-73d74b6ed330' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=55d7266e-85d5-4686-ab20-73d74b6ed330 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-init-upstart-55d7266e-85d5-4686-ab20-73d74b6ed330' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=55d7266e-85d5-4686-ab20-73d74b6ed330 ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-recovery-55d7266e-85d5-4686-ab20-73d74b6ed330' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=55d7266e-85d5-4686-ab20-73d74b6ed330 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 55d7266e-85d5-4686-ab20-73d74b6ed330
else
search --no-floppy --fs-uuid --set=root 55d7266e-85d5-4686-ab20-73d74b6ed330
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sdd1/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/sdd1 during installation
UUID=55d7266e-85d5-4686-ab20-73d74b6ed330 / ext4 errors=remount-ro 0 1
/swapfile none swap sw 0 0
--------------------------------------------------------------------------------

=================== sdd1: Location of files loaded by Grub: ====================

GiB - GB File Fragment(s)

4.409400940 = 4.734558208 boot/grub/grub.cfg 3
4.402061462 = 4.726677504 boot/grub/i386-pc/core.img 1
1.707241058 = 1.833136128 boot/vmlinuz-4.10.0-19-generic 2
1.707241058 = 1.833136128 vmlinuz 2
3.790981293 = 4.070535168 boot/initrd.img-4.10.0-19-generic 2
3.790981293 = 4.070535168 initrd.img 2

=============================== StdErr Messages: ===============================

File descriptor 9 (/proc/2689/mountinfo) leaked on lvs invocation. Parent PID 9695: bash
File descriptor 63 (pipe:[205625]) leaked on lvs invocation. Parent PID 9695: bash

ADDITIONAL INFORMATION :
=================== log of boot-info 2017-05-20__01h30 ===================
boot-info version : 4ppa40
boot-sav version : 4ppa40
glade2script version : 3.2.3~ppa1
boot-sav-extra version : 4ppa40
Error: /dev/sda: unrecognised disk label
Error: /dev/sda: unrecognised disk label
boot-info is executed in live-session (Ubuntu 17.04, zesty, Ubuntu, x86_64)
CPU op-mode(s): 32-bit, 64-bit
file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --- maybe-ubiquity
ls: cannot access '/home/usr/.config': No such file or directory

=================== os-prober:
/dev/sdd1:Ubuntu 17.04 (17.04):Ubuntu:linux

=================== blkid:
/dev/sdb1: LABEL="Drive_2" UUID="0CA0E4B7A0E4A902" TYPE="ntfs" PARTUUID="80578057-01"
/dev/sdc1: LABEL="UBUNTU 17_0" UUID="B6AB-BB7C" TYPE="vfat" PARTUUID="1f7cc1f4-01"
/dev/loop0: TYPE="squashfs"
/dev/sdd1: UUID="55d7266e-85d5-4686-ab20-73d74b6ed330" TYPE="ext4" PARTUUID="86375b90-01"


1 disks with OS, 1 OS : 1 Linux, 0 MacOS, 0 Windows, 0 unknown type OS.


=================== /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330/etc/grub.d/ :
drwxr-xr-x 2 root root 4096 Apr 12 03:14 grub.d
total 80
-rwxr-xr-x 1 root root 9783 Mar 30 21:45 00_header
-rwxr-xr-x 1 root root 6258 Nov 1 2016 05_debian_theme
-rwxr-xr-x 1 root root 12676 Mar 30 21:45 10_linux
-rwxr-xr-x 1 root root 11281 Mar 30 21:45 20_linux_xen
-rwxr-xr-x 1 root root 1992 Jan 28 2016 20_memtest86+
-rwxr-xr-x 1 root root 12059 Mar 30 21:45 30_os-prober
-rwxr-xr-x 1 root root 1418 Mar 30 21:45 30_uefi-firmware
-rwxr-xr-x 1 root root 214 Mar 30 21:45 40_custom
-rwxr-xr-x 1 root root 216 Mar 30 21:45 41_custom
-rw-r--r-- 1 root root 483 Mar 30 21:45 README




=================== /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330/etc/default/grub :

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=""
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=20
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"




=================== UEFI/Legacy mode:
This live-session is not in EFI-mode.
SecureBoot maybe enabled.


=================== PARTITIONS & DISKS:
sdb1 : sdb, not-sepboot, no-grubenv nogrub, no-docgrub, no-update-grub, 32, no-boot, no-os, not--efi--part, part-has-no-fstab, part-has-no-fstab, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, nopakmgr, nogrubinstall, no---usr, part-has-no-fstab, not-sep-usr, standard, farbios, /mnt/boot-sav/sdb1.
sdd1 : sdd, not-sepboot, grubenv-ok grub2, signed grub-pc , update-grub, 64, with-boot, is-os, not--efi--part, fstab-without-boot, fstab-without-efi, no-nt, no-winload, no-recov-nor-hid, no-bmgr, notwinboot, apt-get, grub-install, with--usr, fstab-without-usr, not-sep-usr, standard, not-far, /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330.

sdb : not-GPT, BIOSboot-not-needed, has-no-EFIpart, not-usb, no-os, 2048 sectors * 512 bytes
sdd : not-GPT, BIOSboot-not-needed, has-no-EFIpart, usb-disk, has-os, 2048 sectors * 512 bytes


=================== parted -l:

Model: ATA Crucial_CT1050MX (scsi)
Disk /dev/sda: 1050GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: ATA Hitachi HTS72757 (scsi)
Disk /dev/sdb: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 750GB 750GB primary ntfs


Model: SanDisk Cruzer U (scsi)
Disk /dev/sdc: 8004MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 8004MB 8003MB primary fat32 boot, lba


Model: TOSHIBA TransMemory (scsi)
Disk /dev/sdd: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 1049kB 10.0GB 9999MB primary ext4 boot

=================== parted -lm:

BYT;
/dev/sda:1050GB:scsi:512:512:unknown:ATA Crucial_CT1050MX:;

BYT;
/dev/sdb:750GB:scsi:512:4096:msdos:ATA Hitachi HTS72757:;
1:1049kB:750GB:750GB:ntfs::;

BYT;
/dev/sdc:8004MB:scsi:512:512:msdos:SanDisk Cruzer U:;
1:1049kB:8004MB:8003MB:fat32::boot, lba;

BYT;
/dev/sdd:31.0GB:scsi:512:512:msdos:TOSHIBA TransMemory:;
1:1049kB:10.0GB:9999MB:ext4::boot;

=================== lsblk:
KNAME TYPE FSTYPE SIZE LABEL
loop0 loop squashfs 1.5G
sda disk 978.1G
sdb disk 698.7G
sdb1 part ntfs 698.7G Drive_2
sdc disk 7.5G
sdc1 part vfat 7.5G UBUNTU 17_0
sdd disk 28.9G
sdd1 part ext4 9.3G
sr0 rom 1024M

KNAME ROTA RO RM STATE MOUNTPOINT
loop0 1 1 0 /rofs
sda 0 0 0 running
sdb 1 0 0 running
sdb1 1 0 0 /mnt/boot-sav/sdb1
sdc 1 0 0 running
sdc1 1 0 0 /cdrom
sdd 1 0 1 running
sdd1 1 0 1 /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330
sr0 1 0 1 running


=================== mount:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=4043104k,nr_inodes=101077 6,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode =000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=811920k,mode=755)
/dev/sdc1 on /cdrom type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,ioc harset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /rofs type squashfs (ro,noatime)
aufs on / type aufs (rw,noatime,si=510388380dd034de)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_age nt=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,max proto=5,direct,pipe_ino=819)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=811916k,mode=700,ui d=999,gid=999)
gvfsd-fuse on /run/user/999/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=999,group_id=999 )
/dev/sdd1 on /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udi sks2)
/dev/sdb1 on /mnt/boot-sav/sdb1 type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blks ize=4096)


=================== ls:
/sys/block/sda (filtered): alignment_offset badblocks bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight integrity power queue range removable ro size slaves stat subsystem trace uevent
/sys/block/sdb (filtered): alignment_offset badblocks bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight integrity power queue range removable ro sdb1 size slaves stat subsystem trace uevent
/sys/block/sdc (filtered): alignment_offset badblocks bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight integrity power queue range removable ro sdc1 size slaves stat subsystem trace uevent
/sys/block/sdd (filtered): alignment_offset badblocks bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight integrity power queue range removable ro sdd1 size slaves stat subsystem trace uevent
/sys/block/sr0 (filtered): alignment_offset badblocks bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight integrity power queue range removable ro size slaves stat subsystem trace uevent
/dev (filtered): autofs block bsg btrfs-control bus cdrom cdrw char console core cpu cpu_dma_latency cuse disk dri drm_dp_aux0 dvd dvdrw ecryptfs fb0 fd freefall full fuse hpet hugepages hwrng i2c-0 i2c-1 i2c-10 i2c-11 i2c-12 i2c-13 i2c-14 i2c-2 i2c-3 i2c-4 i2c-5 i2c-6 i2c-7 i2c-8 i2c-9 initctl input kfd kmsg lightnvm log mapper mcelog media0 mei0 mem memory_bandwidth mqueue net network_latency network_throughput null port ppp psaux ptmx pts random rfkill rtc rtc0 sda sdb sdb1 sdc sdc1 sdd sdd1 sg0 sg1 sg2 sg3 sg4 shm snapshot snd sr0 stderr stdin stdout uhid uinput urandom userio v4l vfio vga_arbiter vhci vhost-net video0 zero
ls /dev/mapper: control

=================== hexdump -n512 -C /dev/sdb1
00000000 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00 |.R.NTFS .....|
00000010 00 00 00 00 00 f8 00 00 3f 00 ff 00 00 08 00 00 |........?.......|
00000020 00 00 00 00 80 00 80 00 ff 4f 54 57 00 00 00 00 |.........OTW....|
00000030 00 00 0c 00 00 00 00 00 02 00 00 00 00 00 00 00 |................|
00000040 f6 00 00 00 01 00 00 00 02 a9 e4 a0 b7 e4 a0 0c |................|
00000050 00 00 00 00 fa 33 c0 8e d0 bc 00 7c fb 68 c0 07 |.....3.....|.h..|
00000060 1f 1e 68 66 00 cb 88 16 0e 00 66 81 3e 03 00 4e |..hf......f.>..N|
00000070 54 46 53 75 15 b4 41 bb aa 55 cd 13 72 0c 81 fb |TFSu..A..U..r...|
00000080 55 aa 75 06 f7 c1 01 00 75 03 e9 dd 00 1e 83 ec |U.u.....u.......|
00000090 18 68 1a 00 b4 48 8a 16 0e 00 8b f4 16 1f cd 13 |.h...H..........|
000000a0 9f 83 c4 18 9e 58 1f 72 e1 3b 06 0b 00 75 db a3 |.....X.r.;...u..|
000000b0 0f 00 c1 2e 0f 00 04 1e 5a 33 db b9 00 20 2b c8 |........Z3... +.|
000000c0 66 ff 06 11 00 03 16 0f 00 8e c2 ff 06 16 00 e8 |f...............|
000000d0 4b 00 2b c8 77 ef b8 00 bb cd 1a 66 23 c0 75 2d |K.+.w......f#.u-|
000000e0 66 81 fb 54 43 50 41 75 24 81 f9 02 01 72 1e 16 |f..TCPAu$....r..|
000000f0 68 07 bb 16 68 70 0e 16 68 09 00 66 53 66 53 66 |h...hp..h..fSfSf|
00000100 55 16 16 16 68 b8 01 66 61 0e 07 cd 1a 33 c0 bf |U...h..fa....3..|
00000110 28 10 b9 d8 0f fc f3 aa e9 5f 01 90 90 66 60 1e |(........_...f`.|
00000120 06 66 a1 11 00 66 03 06 1c 00 1e 66 68 00 00 00 |.f...f.....fh...|
00000130 00 66 50 06 53 68 01 00 68 10 00 b4 42 8a 16 0e |.fP.Sh..h...B...|
00000140 00 16 1f 8b f4 cd 13 66 59 5b 5a 66 59 66 59 1f |.......fY[ZfYfY.|
00000150 0f 82 16 00 66 ff 06 11 00 03 16 0f 00 8e c2 ff |....f...........|
00000160 0e 16 00 75 bc 07 1f 66 61 c3 a0 f8 01 e8 09 00 |...u...fa.......|
00000170 a0 fb 01 e8 03 00 f4 eb fd b4 01 8b f0 ac 3c 00 |..............<.|
00000180 74 09 b4 0e bb 07 00 cd 10 eb f2 c3 0d 0a 41 20 |t.............A |
00000190 64 69 73 6b 20 72 65 61 64 20 65 72 72 6f 72 20 |disk read error |
000001a0 6f 63 63 75 72 72 65 64 00 0d 0a 42 4f 4f 54 4d |occurred...BOOTM|
000001b0 47 52 20 69 73 20 6d 69 73 73 69 6e 67 00 0d 0a |GR is missing...|
000001c0 42 4f 4f 54 4d 47 52 20 69 73 20 63 6f 6d 70 72 |BOOTMGR is compr|
000001d0 65 73 73 65 64 00 0d 0a 50 72 65 73 73 20 43 74 |essed...Press Ct|
000001e0 72 6c 2b 41 6c 74 2b 44 65 6c 20 74 6f 20 72 65 |rl+Alt+Del to re|
000001f0 73 74 61 72 74 0d 0a 00 8c a9 be d6 00 00 55 aa |start.........U.|
00000200

=================== df -Th:

Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs tmpfs 793M 20M 774M 3% /run
/dev/sdc1 vfat 7.5G 1.5G 6.0G 21% /cdrom
/dev/loop0 squashfs 1.5G 1.5G 0 100% /rofs
aufs aufs 3.9G 298M 3.6G 8% /
tmpfs tmpfs 3.9G 25M 3.9G 1% /dev/shm
tmpfs tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs tmpfs 3.9G 3.2M 3.9G 1% /tmp
tmpfs tmpfs 793M 208K 793M 1% /run/user/999
/dev/sdd1 ext4 9.2G 4.6G 4.1G 53% /media/ubuntu/55d7266e-85d5-4686-ab20-73d74b6ed330
/dev/sdb1 fuseblk 699G 562G 138G 81% /mnt/boot-sav/sdb1

=================== fdisk -l:
Disk /dev/loop0: 1.5 GiB, 1553670144 bytes, 3034512 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/sda: 978.1 GiB, 1050214588416 bytes, 2051200368 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: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x80578057

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1465145343 1465143296 698.7G 7 HPFS/NTFS/exFAT




Disk /dev/sdc: 7.5 GiB, 8004304896 bytes, 15633408 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: 0x1f7cc1f4

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 15633407 15631360 7.5G c W95 FAT32 (LBA)


Disk /dev/sdd: 28.9 GiB, 31024349184 bytes, 60594432 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: 0x86375b90

Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 19531775 19529728 9.3G 83 Linux




=================== Suggested repair
The default repair of the Boot-Repair utility would purge (in order to) and reinstall the grub2 of sdd1 into the MBRs of all disks (except USB without OS).
Additional repair would be performed: unhide-bootmenu-10s


=================== Final advice in case of suggested repair
Please do not forget to make your BIOS boot on sdd (31.0GB) disk!


=================== User settings
The settings chosen by the user will not act on the boot.



Additionally, I tried (using an 8G Sandisk Cruiser USB pendrive) to install a Live CD with persistence, but it also puts GRUB as the boot manager, and hence won't boot, with same symptoms as the full install that I'm currently troubleshooting.

ubfan1
May 20th, 2017, 04:03 AM
Maybe the grub on sdb is the one getting started and then failing since it has no place for its files. Can you get the boot device/OS choice at power up (some function key) and explicitly select the USB to boot? The only other thing to consider is to ensure your install media passes all hashchecks, the ISO and any media check you can run on the install USB itself. I suppose it would be possible to actually set up grub on sdb to boot with files on the USB, but it shouldn't be that tricky just to set up a legacy USB boot.

tracyspda
May 20th, 2017, 05:07 AM
I'm not sure how GRUB got installed on /dev/sdb, unless it was through one of the many times that I tried to "repair" GRUB. Is there a way to remove it from that drive? It really shouldn't be there, as there is nothing bootable on that drive (just data storage)....

I don't have an option to explicitly boot one single device, all I can do is set the preferred boot order (currently USB --> CD --> internal HD).

oldfred
May 20th, 2017, 02:36 PM
It does not normally matter to have a boot loader on a data drive. Some actually prefer it to allow booting another install.

As long as you are booting USB it should be loading grub on sdd.

What brand/model system? How much RAM?
With one install you do not normally get grub menu, it just boots. So it could be thru grub and having issues with booting.
Hold shift key from BIOS screen until grub menu appears to get grub menu.

tracyspda
May 20th, 2017, 06:59 PM
Well, I can boot the Live CD from USB without having to change any settings, so I know its checking the USB first. So it should be booting from the installed version, as all I do is shut down, swap USB pen drives, and boot again.

I did end up installing a copy of Ubuntu to the hard drive, and the GRUB menu comes up when I boot that one, so the system is compatible with GRUB. Just have to figure out why it won't load from the USB pen drive install.

oldfred
May 20th, 2017, 07:07 PM
While grub is supposed to use UUID to know/find correct partition the old device settings may be an issue.

You have this because when you installed it was the third drive.

set root='hd3,msdos1'

But when you boot, the boot drive per BIOS/grub is always hd0.
Hold shift key, so you get grub menu and change using e the entries for the first boot stanza from hd3 to hd0.
You do not need to change everything in grub menu, but as soon as you boot do this to update everything:
sudo update-grub

tracyspda
May 20th, 2017, 10:26 PM
I can only get to the GRUB menu if I boot the install on the hard drive. And that install, having been done just last night, doesn't have any entries for the USB pen drive partitions, as it wasn't mounted during the hard drive install.

I am thinking that I'm going to try the USB install again (wipe the pen drive, then install again) and see if having other OS installs affects the install.

But honestly, at this point, I'm not hopeful that it will make a difference. I'm wondering if it's not something about the way the BIOS is setting up the pen drive during boot that is causing it to not work. I will have to do some more research on the peculiarities of the HP BIOS and see if there is anything that I can find on that front. But it is weird that the Live CD boots from USB where the full install doesn't. But I think the Live CD uses Syslinux rather than GRUB for the boot manager...

oldfred
May 20th, 2017, 10:41 PM
It should not matter what boot loader is in MBR.
But most newer UEFI/BIOS do have settings to allow USB booting or not. So if Syslinux works then grub should also boot.

ubfan1
May 21st, 2017, 01:48 AM
The full install USB has the grub menu at /boot/grub/grub.cfg. From another running, mount the USB and edit that grub file, changing the hd3 to hd0, and then if that fails, to hd1, then hd2. The enumeration of the drives is sometimes difficult to figure out, but once you boot the USB, run sudo update-grub to fix things up.

tracyspda
May 23rd, 2017, 07:07 PM
I will look at the /boot/grub/grub.cfg file and see what I can do with it.

In the meantime, here are some things that I have tried, and their various success/failure:

1. Install Windows 10 on the primary hard drive. Success.
2. Install Ubuntu side-by-side on the primary hard drive. Success. GRUB menu comes up, and I am able to choose to boot either OS successfully.
3. Created a new Ubuntu Live USB, using Rufus. Success. The USB boots, and I am able to run Ubuntu in Live CD mode, and I can run the installer from the USB.
4. Created a Windows 10 USB installer, using Rufus. Success. The USB boots, and the installer starts.
5. Created a USB with Windows 10 installed, using WinToUSB. Success. The USB boots, and Windows runs successfully.
6. Created a USB with Ubuntu installed (full install). Partial success. The install completes, and I can view the installed files from a booted OS. However, it will not boot - black screen (or "GRUB loading." if I hold the shift key during boot.
7. Resized partitions on the installed Windows 10 USB, and rebooted. Success. The resized partition doesn't affect the ability to boot or run Windows from the USB.
8. Installed Ubuntu into the freed area on the Windows USB. Partial success. The install succeeds, and I can see the installed files from a booted OS. However, the USB will no longer boot - not to either OS - same symptoms as number 6, above.

This leads me to wonder if something isn't getting written incorrectly into the boot sector/boot manager of the USB drive - possibly an option that would be valid for a hard drive but not for a flash drive?

I will keep looking, and am happy to try any other suggestions or tools that might be suggested.

oldfred
May 23rd, 2017, 08:11 PM
In UEFI mode grub only installs to the ESP - efi system partition on the drive seen as sda.
And if you have an install on internal sda drive, it overwrites the grub and makes flash drive's grub the default boot. And if you then unplug flash drive you cannot boot install on internal.
I quickly learned to back up my entire ESP. But it turns out only real difference is /EFI/ubuntu/grub.cfg which is a 3 line configfile that points to the full grub.cfg in your install. So now I restore or even manually edit with correct UUID & drive/partition.

Did you manually partition flash drive so it has ESP? That is essential as UEFI only boots external drives from /EFI/Boot/bootx64.efi.
So you have to copy /EFI/ubuntu in sda's ESP to flash drive's ESP. And copy again to /EFI/Boot and rename shimx64.efi to bootx64.efi. The version of grub in a full install expects to find more files in /EFI/ubuntu. Where the version of grub in an installer is a limited version of grub and has all files in its folder.

You also have to edit fstab with correct efi partition for flash drive. It will have the entry for ESP on sda.

And first direct from UEFI boot of flash drive probably have to manually edit entry in grub.
UEFI/BIOS boot drive is always first drive hd0 in UEFI and grub, but grub.cfg will show hd2 or hd3 depending on drive definition when booting. You only need to edit top lines & first grub menu entry. But after booting and editing fstab run sudo update-grub to update all grub entries.

I just mounted my ESP (by label on flash drive with full install of 17.10)

file:///media/fred/ESP/EFI/ubuntu


And this is my grub.cfg:

search.fs_uuid 50c34e62-7135-4177-b004-ca56537bc971 root hd0,gpt3
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

And this file is really a copy of shimx64.efi.
file:///media/fred/ESP/EFI/Boot/bootx64.efi

tracyspda
May 23rd, 2017, 09:18 PM
Well, I dont have UEFI, so I dont think that's the issue here (I have verified in both the hard drive Windows install and the hard drive Ubuntu install that the system is booting in BIOS mode, and there is no EFI partition on the hard drive). And even after full install on a USB drive, I can still boot both OS's from the internal hard drive.

tracyspda
May 23rd, 2017, 09:37 PM
So, here's the /boot/grub/grub.cfg file from the hard drive (/dev/sda/sda5)



#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=C
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-21-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-f9573c63-14a2-441a-bca2-27df097a7422' {
menuentry 'Ubuntu, with Linux 4.10.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-21-generic-advanced-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
echo 'Loading Linux 4.10.0-21-generic ...'
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-21-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-21-generic-init-upstart-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
echo 'Loading Linux 4.10.0-21-generic ...'
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-21-generic-recovery-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
echo 'Loading Linux 4.10.0-21-generic ...'
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-advanced-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-init-upstart-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-recovery-f9573c63-14a2-441a-bca2-27df097a7422' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-10A67558A6753EF2' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 10A67558A6753EF2
else
search --no-floppy --fs-uuid --set=root 10A67558A6753EF2
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


And here's the /boot/grub/grub.cfg file from the USB flash drive (currently mounted as /dev/sdc/sdc2)



#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-1dbcf3e7-c427-494e-b4f2-234a8815bb0a' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=1dbcf3e7-c427-494e-b4f2-234a8815bb0a ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-19-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-1dbcf3e7-c427-494e-b4f2-234a8815bb0a' {
menuentry 'Ubuntu, with Linux 4.10.0-19-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-advanced-1dbcf3e7-c427-494e-b4f2-234a8815bb0a' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=1dbcf3e7-c427-494e-b4f2-234a8815bb0a ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (upstart)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-init-upstart-1dbcf3e7-c427-494e-b4f2-234a8815bb0a' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=1dbcf3e7-c427-494e-b4f2-234a8815bb0a ro quiet splash $vt_handoff init=/sbin/upstart
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.10.0-19-generic-recovery-1dbcf3e7-c427-494e-b4f2-234a8815bb0a' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
echo 'Loading Linux 4.10.0-19-generic ...'
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=1dbcf3e7-c427-494e-b4f2-234a8815bb0a ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.10.0-19-generic
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd3,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-10A67558A6753EF2' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 10A67558A6753EF2
else
search --no-floppy --fs-uuid --set=root 10A67558A6753EF2
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry 'Ubuntu 17.04 (17.04) (on /dev/sda5)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-21-generic
}
submenu 'Advanced options for Ubuntu 17.04 (17.04) (on /dev/sda5)' $menuentry_id_option 'osprober-gnulinux-advanced-f9573c63-14a2-441a-bca2-27df097a7422' {
menuentry 'Ubuntu (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-21-generic--f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-21-generic (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-21-generic--f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-21-generic (upstart) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-21-generic--f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff init=/sbin/upstart
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-21-generic (recovery mode) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-21-generic-root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro recovery nomodeset-f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-21-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro recovery nomodeset
initrd /boot/initrd.img-4.10.0-21-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-19-generic--f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (upstart) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-19-generic--f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro quiet splash $vt_handoff init=/sbin/upstart
initrd /boot/initrd.img-4.10.0-19-generic
}
menuentry 'Ubuntu, with Linux 4.10.0-19-generic (recovery mode) (on /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.10.0-19-generic-root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro recovery nomodeset-f9573c63-14a2-441a-bca2-27df097a7422' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 f9573c63-14a2-441a-bca2-27df097a7422
else
search --no-floppy --fs-uuid --set=root f9573c63-14a2-441a-bca2-27df097a7422
fi
linux /boot/vmlinuz-4.10.0-19-generic root=UUID=f9573c63-14a2-441a-bca2-27df097a7422 ro recovery nomodeset
initrd /boot/initrd.img-4.10.0-19-generic
}
}

menuentry 'Windows 10 (on /dev/sdd1)' --class windows --class os $menuentry_id_option 'osprober-chain-01D2D2A9220C8EC0' {
insmod part_msdos
insmod ntfs
set root='hd3,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1 01D2D2A9220C8EC0
else
search --no-floppy --fs-uuid --set=root 01D2D2A9220C8EC0
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###


I do notice that the grub.cfg from the flash drive *also* has entries to be able to boot from the hard drive, but I wouldn't expect that to make any difference - that should just add a couple of extra choices to the GRUB menu...

So I feel like either something very obvious is staring me in the face and I'm not seeing it, or something very obscure is happening and I don't know enough about it to see it.

I really don't know enough about GRUB to be able to play around in these files with impunity, but I have to wonder - what would happen if I edited the select line to remove the hints that point to the various partitions, leaving just the UUID for it to use to pick the partition? In other words, changing this:



if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos2 --hint-efi=hd3,msdos2 --hint-baremetal=ahci3,msdos2 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi


to this:



if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
else
search --no-floppy --fs-uuid --set=root 1dbcf3e7-c427-494e-b4f2-234a8815bb0a
fi


Would that cause it to fail, or would that just eliminate the possibility of it looking at the wrong mounted drive for the boot partition? I really don't know - I have to assume that these .cfg files were written the way they were for a reason, and I don't want to poke in them too much without understanding the consequences of my poking, so....

Any additional suggestions?

oldfred
May 23rd, 2017, 10:33 PM
I had not played around with my 17.10 install for a couple of weeks, not sure I even had it boot.
But I booted it.
From UEFI I choose PMAP which I believe is how my UEFI sees external drive.
And I manually edited all the hd2 & AHCI2 entries to 0 (mine was seen as hd2 where yours is hd3)
And it booted.
I noted that I had previously updated fstab with correct UUID for ESP on flash drive and added noatime to make it slightly faster.

But then my sudo update-grub did not change entries to hd0??
And on reboot it automatically booted to flash drive.
I did find then in UEFI that it had a new ubuntu entry as first and it was for my flash drive. I changed that back to my internal main working install.
My 0003 entry was first in boot order. So not sure if I booted a specific hard drive entry or a default /EFI/Boot/bootx64.efi default external drive entry.

sudo efibootmgr -v
BootOrder: 0000,0002,0003,0004,0005,0001,0006
Boot0000* ubuntu HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0001* UEFI hard drive HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0002* zesty HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\ZESTY\SHIMX64.EFI)
Boot0003* ubuntu HD(1,GPT,d7c8771c-f375-4316-aeea-32013beb7df8,0x800,0x64000)/File(\EFI\ubuntu\shimx64.efi)


I have edited (read broken) grub many times.
I normally go the other way and remove all the search parameters and make it depend on the set root= and specific drive and UUID. But often have wrong drive and as booting have to edit anyway. I find inserting a flash drive often changes drive order so my hd1 becomes hd2. But with BIOS hd0 was always the boot drive. Now not sure with newest UEFI & grub.
Off to do more testing myself.