Bootable USB Distro

General support questions
Post Reply
melblanc
Posts: 6
Joined: 2019/07/26 18:42:17

Bootable USB Distro

Post by melblanc » 2019/07/26 19:02:56

I have downloaded and successfully run the ISO to install CentOS
from a bootable flash drive. However I am trying to boot and
run the OS from the flash drive and not install the OS on the
existing internal storage of the PC. Is there info available on
creating a bootable flash which will allow running from the
flash drive as opposed to having to run from internal storage
on the pc?

Thanks

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: Bootable USB Distro

Post by chemal » 2019/07/26 20:20:49

If you insert a second thumb drive you can install on that in the same way you would install on an internal drive.

Also there are CentOS-7-x86_64-LiveGNOME-1810.iso and CentOS-7-x86_64-LiveKDE-1810.iso.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Bootable USB Distro

Post by aks » 2019/07/26 20:21:22

What like the livecd?

melblanc
Posts: 6
Joined: 2019/07/26 18:42:17

Re: Bootable USB Distro

Post by melblanc » 2019/07/29 10:57:36

chemal wrote:
2019/07/26 20:20:49
If you insert a second thumb drive you can install on that in the same way you would install on an internal drive.

Also there are CentOS-7-x86_64-LiveGNOME-1810.iso and CentOS-7-x86_64-LiveKDE-1810.iso.
Thank you. Appreciate the feedback. Had not considered doing that but will give it a whirl.

Mel

melblanc
Posts: 6
Joined: 2019/07/26 18:42:17

Re: Bootable USB Distro

Post by melblanc » 2019/07/29 10:59:48

aks wrote:
2019/07/26 20:21:22
What like the livecd?
Yes. I prefer to use a single flash drive if practical. Have been out of the loop for a few years working with Linux and was surprised I did not immediately stumble into a 'Live Distro'.

Mel

melblanc
Posts: 6
Joined: 2019/07/26 18:42:17

Re: Bootable USB Distro

Post by melblanc » 2019/07/30 11:31:29

chemal wrote:
2019/07/26 20:20:49
If you insert a second thumb drive you can install on that in the same way you would install on an internal drive.

Also there are CentOS-7-x86_64-LiveGNOME-1810.iso and CentOS-7-x86_64-LiveKDE-1810.iso.
Ok, gave installing on a second USB Thumb drive a whirl and while it does install, it is not what I call usable. I cannot log in as root and it takes about 10 minutes to get to the login prompt from power up on the pc. Will try to reinstall and see if this is just a fluke.

For any one trying to install to a second drive I found that a 64 GB thumb drive would report on 135 MB of usable space. Inspection with disk partitioning tool would only acknowledge the 135 MB space but did show 65 GB of total space. Eventually I used 'fdisk' to change the partition on the thumb drive to ext4 instead of Microsoft FAT32. (4GB limit?). In any event after changing to ext 4 using fdisk the CENTos7 installer proceeded to complete the installation. Seemed very slow as it took over an hour to install to the flash. Will try a USB External 500 GB drive later and see if the results are different.

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: Bootable USB Distro

Post by chemal » 2019/07/30 15:38:32

melblanc wrote:
2019/07/30 11:31:29
it takes about 10 minutes to get to the login prompt from power up
Slow drive, slow CentOS. Some thumb drives are real slow, especially the cheap ones.

melblanc
Posts: 6
Joined: 2019/07/26 18:42:17

Re: Bootable USB Distro

Post by melblanc » 2019/07/30 15:50:57

chemal wrote:
2019/07/30 15:38:32
melblanc wrote:
2019/07/30 11:31:29
it takes about 10 minutes to get to the login prompt from power up
Slow drive, slow CentOS. Some thumb drives are real slow, especially the cheap ones.
When it gets down to installation of the apps is really were things bog down. Both pen
drives are made by Kingston, their 'DataTraveler' model which is rated as a USB3.0
device. I will take a look at the hub in use once this attempt finishes. The laptop
is old enough it may have a USB2.0 port. Have had some USB3.0 devices that when
connected to a USB2.0 hub behave wierdly so that may be what I am running into.
What I mean by wierdly is the transfer rates dropped to USB1.1 rates.

In retrospect I should have used the minimal ISO rather than the full enchilada.

One other thing I stumbled into that may or may not be an issue. Apparently
there has been situations were partitions are not aligned to 4K data blocks
and this has caused mischief which seems to manifest as a time bandit during
read-writes. While the 'gparted' seems to address this for 'SSD' and 'HDD' I do not
find any mention of it dealing with the matter on flash drives although there is
a setting in 'gparted' which allows the user to "align to:". The options there are
'MiB', 'Cylinder' and 'None'. Will dig deeper.
Last edited by melblanc on 2019/08/02 12:22:46, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Bootable USB Distro

Post by TrevorH » 2019/07/30 19:07:15

Almost all USB sticks are rubbish at writing unless you pay through the nose for one. Test your particular device for sequential throughput using e.g. dd if=/dev/zero of=/dev/sdX bs=1M count=1024 oflag=direct status=progress - being aware that this is a destructive test and will overwrite all data on the device. Then think that the throughput rate you just measured is for sequential i/o and doing random i/o will be about 1/10th of that speed.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

melblanc
Posts: 6
Joined: 2019/07/26 18:42:17

Re: Bootable USB Distro

Post by melblanc » 2019/07/31 11:03:10

TrevorH wrote:
2019/07/30 19:07:15
Almost all USB sticks are rubbish at writing unless you pay through the nose for one. Test your particular device for sequential throughput using e.g. dd if=/dev/zero of=/dev/sdX bs=1M count=1024 oflag=direct status=progress - being aware that this is a destructive test and will overwrite all data on the device. Then think that the throughput rate you just measured is for sequential i/o and doing random i/o will be about 1/10th of that speed.
Well it has been 1 step forward and two backwards thus far. The improvement is the installation drive now provides a quick bootup to the login prompt, but does nto seem to recognize the user id during login. I created a User ID and assigned root privileges. One question I do have, is the user 'root' allowed to login in at the first login prompt. When I tried that the pc wandered off about two minutes and returned to the login prompt without ever challenging me for the root password. It simply fell back to the login prompt.

I have tried a few different sticks (brands, USB 2.0, USB 3.0 etc) and the results thus far have been the same for trying to install the OS on the flash drive to create a bootable usb device. Looking further at the partition alignment thing with 4K boundary it looks to have been addressed at least with SSD and HDD. The CENTos install also allows you to select a 1 MiB alignment when creating partitions which supposedly mitigates the issue but I am not convinced it solves the problem on a Thumb Drive.

Flashbench was recommended to troubleshoot and determine if 4K boundaries are an issue. The output of the program is above my paygrade at this time. It is another item on my 'Honeydo' list. Thanks for the suggestion on using 'dd'. It continues to be a front line tool for solving problems.

Addendum: Tried the dd command and results were all over the map. In one case it took 20 seconds to write 1 MB/s to the drive, then suddenly the rate jumped to 5 - 7 MB/s zoomed to 33 MB/s and then back down to 2 MB/s. One time it took 145 seconds to write 1GB, the next it took 31 seconds, the 3rd it took 885 seconds. I wanted the size of the pen drive but it appears I may have to settle for the external rust bucket. Will keep probing this and see if I can identify what is happening at the flash (pen) drive level.

Thanks

Post Reply