2017年6月16日金曜日

UEFI-and-BIOS

Preparation

It might help to prepare by reading the following link

https://help.ubuntu.com/community/Installation/FromUSBStick

The following link gives more background information about partitioning

https://help.ubuntu.com/community/DiskSpace 

Original attempt

/original-attempt

Not stable enough to survive certain updates

I expected that it could be installed into a USB pendrive as a good alternative to a persistent live system, possible to update and upgrade without limits. But unfortunately a current update involving a new kernel and updating grub will make it fail to boot. So this system is not stable enough to survive certain updates. It is good only as an illustration of a method to make a bootable drive in UEFI as well as BIOS mode.

Stable alternatives

If you want a stable portable system, that boots in UEFI mode as well as BIOS/CSM mode, and in 64-bit as well as 32-bit computers, you can try One pendrive for all PC (Intel/AMD) computers. If you want a pendrive with a live and an installed system, you can try A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode.

Detailed instructions

There are links to instructions how to make an installed system (typically in a USB pendrive) that works with UEFI and BIOS, and is small enough to work in an undersized 16 GB pendrive. This system is created from Ubuntu Xenial amd64 ('gamma' because it is beyond beta), and was simplified compared to the previous methods to make a stable installed system for UEFI and BIOS mode.

See this link to the sub-page: /stable-alternative

This link shows the post in an Ubuntu Forums tutorial, where the method was published:

Another new, simpler and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode

with a description how to make it 'from scratch' plus a link to uploaded compressed image files plus a small script to fix the GPT after cloning.

Installation from a compressed image file

Compressed image file

It is straight-forward to install from a compressed image file from with mkusb or mkusb-nox. Some tools may not work with compressed images of such large files. I tried in Lubuntu Xenial daily to restore disk image with gnome-disks alias Disks, but it considered the size to be 3.5 GB, when it was 12 GB, so the image was truncated, Bug #1571255

After this cloning operation you should run gpt-fix in order to match the gpt data to the current drive size.

Description of the short-cut to make an installed system (typically in a USB pendrive) that works with UEFI and BIOS from a compressed image file:

Download source 1

Download the following compressed image files from

http://phillw.net/isos/linux-tools/uefi-n-bios

Remember to check with md5sum, that the download of the compressed image file was successful.

dd_Ubuntu_16.04-gamma-UEFI-n-BIOS-12GB.img.xz version for solid state and hard disk drives (original)

dd_Ubuntu_16.04-gamma-UEFI-n-BIOS-4-pendrive-12GB.img.xz version for pendrives

dd_Ubuntu_16.04.1_2017-01-17_UEFI-n-BIOS-12GB.img.xz version for solid state and hard disk drives (updated)

dd_text_16.04-UEFI-n-BIOS_2017-01-15_intel-4-pendrive-7.8GB.img.xz mini system with a text user interface

dd_text_16.04-UEFI-n-BIOS_2017-05-07_intel-4-pendrive-7.8GB.img.xz mini system with a text user interface (updated)

dd_dus-lxde_16.04-UEFI-n-BIOS_2016-05-07_intel-4-pendrive-7.8GB.img.xz light-weight desktop version with mkusb-dus

Download source 2

Download the following compressed image files from

https://drive.google.com/open?id=0BzX-18u3W1sQUXI2YV95dHJxVlE

dd_Ubuntu_16.04.1_2017-01-17_UEFI-n-BIOS-12GB.img.xz version for solid state and hard disk drives

dd_dus-lxde_16.04-UEFI-n-BIOS_2016-12-12_intel-4-pendrive-7.8GB.img.xz light-weight desktop version with mkusb-dus

dd_text_16.04-UEFI-n-BIOS_2017-01-15_intel-4-pendrive-7.8GB.img.xz mini system with a text user interface

md5sums:

bac77b006baccb3d21923e3753f17641  dd_Ubuntu_16.04.1_2017-01-17_UEFI-n-BIOS-12GB.img.xz
977fe780f2888b5787c792f2b212378d  dd_dus-lxde_16.04-UEFI-n-BIOS_2016-12-12_intel-4-pendrive-7.8GB.img.xz
13e4fa2ecb8243b39388f31dbfd3a0ea  dd_text_16.04-UEFI-n-BIOS_2017-01-15_intel-4-pendrive-7.8GB.img.xz

Torrent file

You can download a torrent file in order to get a compressed image file.

The dd_text_16.04-UEFI-n-BIOS compressed image file was made up to date, and a torrent file was uploaded in January 2017. This is the main choice, if you want to start with a light-weight system and install your own selection of program packages - desktop packages, server packages and application packages.

dd_text_16.04-UEFI-n-BIOS_2017-01-15_intel-4-pendrive-7.8GB.img.xz.torrent

There is a special version of the UEFI-n-BIOS system with the new dus installer. It can be used as a general purpose installed system too, in USB pendrives, memory cards (and also in SSDs and HDDs). Download the following torrent file, and use it to get the compressed image file.

dd_dus-lxde_16.04-UEFI-n-BIOS_2016-12-12_intel-4-pendrive-7.8GB.img.xz.torrent

See more details at this link: /torrent

User and password

user: guru

password: changeme

in Linux

The target drive will be overwritten. Double-check which is the target drive, the drive you want to install into!

Use mkusb to install the system from the compressed image file.

See https://help.ubuntu.com/community/mkusb

gpt_fix in mkusb

The GUID partition table, GPT, is fixed automatically, if you use mkusb 10.6.6 or a newer version to install from these compressed image files. The functions gpt_zap and gpt_fix are built into mkusb.

If you use other tools, you need gpt-fix or to fix the GPT manually with gdisk.

in Windows

Check the download and clone the image in Windows according to the following page

Win32DiskImager/compressed-image_2_USB-or-SD

or according to this summary:

Download the following help programs 

http://www.md5summer.org

http://www.7-zip.org

http://sourceforge.net/projects/win32diskimager

First check that the download was successful with md5summer according to the file md5sums.txt.asc. 

Next extract the image file with 7-zip (It is also possible with winzip)

from dd_Ubuntu_16.04-gamma-UEFI-n-BIOS-4-pendrive-12GB.img.xz

to dd_Ubuntu_16.04-gamma-UEFI-n-BIOS-4-pendrive-12GB.img

The target drive will be overwritten. Double-check which is the target drive, the drive you want to install into!

Then write the extracted image file (without the ending gz) with win32diskimager 

Win32diskimager looks for img files.

gpt-fix

After this cloning operation you should run gpt-fix in order to match the gpt data to the current drive size (unless you are using mkusb version 10.6.6 or newer versions of mkusb).

See more details at /stable-alternative#gpt-fix

Final system tweaks

Decrease wear for a pendrive

Add the mount option noatime in /etc/fstab

# / was on /dev/sdb3 during installation
UUID=4c518694-d97c-4910-bb7b-eeb6a6b73874  /  ext4  noatime,errors=remount-ro 0  1

Do not copy this line. Use your own data, only add noatime,

Turn off journaling

sudo tune2fs -O ^has_journal /dev/sdxy

where x is the drive letter and y is the partition number of the root partition, for example /dev/sda3.

Maybe remove swap

It is also possible to remove the swap partition and the swap entry in /etc/fstab in order to avoid wear due to swapping.

Move swap and grow root partitions

Move the swap partition and grow the root partition to use the whole drive. See this link

http://phillw.net/isos/linux-tools/uefi-n-bios/GrowIt.pdf

Login and password

When you have installed these systems from a compressed image file, and you reboot, you log in with the following user and password

user: guru

password: changeme

It is a good idea to change the password.


Links

If you want a stable portable system, that boots in UEFI mode as well as BIOS/CSM mode, and in 64-bit as well as 32-bit computers, you can try One pendrive for all PC (Intel/AMD) computers. If you want a pendrive with a live and an installed system, you can try A new and so far successful attempt to create a stable portable system, that works in UEFI and BIOS mode

It might be a good idea to try various systems and methods before deciding what to install. Try Ubuntu (Kubuntu, Lubuntu, Xubuntu, ...) before installing it

The following links contain general information

https://help.ubuntu.com/community/Installation/FromUSBStick

https://help.ubuntu.com/community/DiskSpace 

 

0 件のコメント:

コメントを投稿