Originally Posted by
sudodus
A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode
1. Current system, seems very stable so far
The current system contains a live system and an installed system, and both work in UEFI and BIOS mode. The compressed image file
dd_Ubuntu_14.04.2-UEFI-n-BIOS-10GB.img.xz
at
http://phillw.net/isos/linux-tools/uefi-n-bios/
is created like this (only a crude description so far)
So I tried to follow your instructions but with Ubuntu 18.04, but so far with no success. It would be very nice, if you could help me with this.
So here's what I did:
I'm using a SanDisk Ultra Fit USB 3.0 with 128 GB. My goal is to have a portable system which can be booted from most Computers including my Surface Pro 3. As I need the Surface and don't want to constantly repair its booloader (you can't disable the harddrive), I do all the work in VirtualBox.
I partitioned the stick using Gparted as you described in step A, but with an additional partition as partition 1, which is an NTFS partition for exchanging files with Windows.
So sda2 is my Fat32 partition with the live system. I installed the system using Linux Live USB Creator in Windows, because I couldn't download the file in VirtualBox (download errors, not enough free space...)
sda5 is the partition I want to install Ubuntu to.
listed by fdisk -lu
Code:
Festplatte /dev/sda: 115,7 GiB, 124218507264 Bytes, 242614272 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0x0009c581
Gerät Boot Anfang Ende Sektoren Größe Kn Typ
/dev/sda1 2048 112642047 112640000 53,7G 7 HPFS/NTFS/exFAT
/dev/sda2 * 112642048 121653247 9011200 4,3G c W95 FAT32 (LBA)
/dev/sda3 121655294 242614271 120958978 57,7G 5 Erweiterte
/dev/sda5 121655296 203831077 82175782 39,2G 83 Linux
/dev/sda6 203833344 242614271 38780928 18,5G 82 Linux Swap / Solaris
listed by parted -l
Code:
Modell: SanDisk Ultra Fit (scsi)
Festplatte /dev/sda: 124GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: msdos
Disk-Flags:
Nummer Anfang Ende Größe Typ Dateisystem Flags
1 1049kB 57,7GB 57,7GB primary ntfs
2 57,7GB 62,3GB 4614MB primary fat32 boot, LBA
3 62,3GB 124GB 61,9GB extended
5 62,3GB 104GB 42,1GB logical ext4
6 104GB 124GB 19,9GB logical linux-swap(v1)
listed by lsblk
Code:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 115,7G 0 disk
├─sda1 8:1 1 53,7G 0 part /media/jo/Ubuntu Daten
├─sda2 8:2 1 4,3G 0 part /media/jo/MYLINUXLIVE
├─sda3 8:3 1 1K 0 part
├─sda5 8:5 1 39,2G 0 part /media/jo/58338c12-15fd-4212-960d-6eb503964c24
└─sda6 8:6 1 18,5G 0 part
But in step C, when I try to install to sda5 I get an error during/at the end of the installation process.
grub-efi-amd64-signed package failed to install into /target/
I tried installing from a live image or without connection to the internet as that were the solutions I could find through Google.
When this didn't work I installed grub using grub-install after the installation failed. I then proceeded to try and change the configuration files, but as there is no file named vmlinuz-4.15.0-29-generic.efi.signed in sda5/boot I get an error when choosing the new boot option.
There is although a file named vmlinuz-4.15.0-29-generic in this directory.
When using grub-install I made a mistake, rendering the live system unusable too. I reinstalled the live system using LiLi Usb Creator as before. I tried to install Ubuntu to sda5 again after this, getting the same error message and now I don't dare using grub-install again, as I'm just a beginner with Ubuntu and don't know how to do it properly.
So now I can boot the live system, but after trying and failing to boot using the new entry I too get an error message saying /boot/vmlinuz could not be found.
This are the files I changed:
MYLINUXLIVE/boot/grub/grub.cfg
Code:
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
set timeout=5
menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash locale=de_DE bootkbd=de console-setup/lazoutcode=de ---
initrd /casper/initrd.lz
}
menuentry "Install Ubuntu" {
set gfxpayload=keep
linux /casper/vmlinuz 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 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 boot=casper integrity-check quiet splash ---
initrd /casper/initrd.lz
}
menuentry 'Installed Ubuntu, with Linux 4.15.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-29-generic-advanced-2a914602-bccd-4248-8b0a-66cff22173db' {
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 2a914602-bccd-4248-8b0a-66cff22173db
else
search --no-floppy --fs-uuid --set=root 2a914602-bccd-4248-8b0a-66cff22173db
fi
echo 'Loading Linux 4.15.0-29-generic ...'
linux /boot/vmlinuz-4.15.0-29-generic.efi.signed root=UUID=2a914602-bccd-4248-8b0a-66cff22173db ro quiet splash $vt_handoff
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-4.15.0-29-generic
}
MYLINUXLIVE/syslinux/txt.cfg
Code:
label persist
menu label ^Persistenter Modus
kernel /casper/vmlinuz
append bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE persistent noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
label live
menu label ^Live Modus
kernel /casper/vmlinuz
append bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
label live-install
menu label ^Installation
kernel /casper/vmlinuz
append bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE only-ubiquity noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz splash --
label check
menu label ^Uberprufung der Integritat
kernel /casper/vmlinuz
append bootkbd=de console-setup/layoutcode=de console-setup/variantcode=nodeadkeys locale=de_DE noprompt boot=casper integrity-check initrd=/casper/initrd.lz splash --
label memtest
menu label ^Uberprufung des Arbeitsspeichers
kernel /install/mt86plus
# ------------------------------------------------------------------
label ubu-installed
menu label ^Installed Ubuntu in partition 5 with grub in PBR
com32 chain.c32
append boot 5
I think the two main problems are grub not being installed during the installation of Ubuntu 18.04 and the file vmlinuz-4.15.0-29-generic.efi.signed missing, but I don't know how to fix this.
Any help would be appreciated.
Bookmarks