WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dCore-usbinstall  (Read 12624 times)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
dCore-usbinstall
« on: March 29, 2018, 12:02:35 PM »
dCore-usbinstall, the automated way to install a dCore release on a usb stick using extlinux, has been updated to be compatible with both 32 and 64 bit dCore ports.  The package in the 32 bit dCore area has also had the same changes, but does not affect it's functionality. 

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #1 on: March 29, 2018, 12:41:14 PM »
Also now added the ability to choose between both x86 and x86_64 dCore releases available to install to usb regardless of the architecture of the port one is running in the current session.  x86 package also updated.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #2 on: March 30, 2018, 06:35:53 PM »
Added the option to choose from dCore and dCorePlus in each dCore port. 

Below is a way to install to usb dCore from any modern Linux distribution. 

First, download a dCore, below is via a terminal, preferably dCorePlus if any wireless is needed.  Example commands below. 

Code: [Select]
wget http://tinycorelinux.net/dCore/x86/release/dCore-stretch/dCorePlus-stretch.iso
wget http://tinycorelinux.net/dCore/x86/release/dCore-stretch/dCorePlus-stretch.iso.md5.txt

md5sum -c dCorePlus-stretch.iso.md5.txt


Plug in the desired USB device, and use one of the below commands to determine which device is a USB, making sure to choose the right one:


This lists usb devices by name:
Code: [Select]
for I in `ls /dev/disk/by-id/ | grep usb`; do E=`readlink /dev/disk/by-id/"$I" | sed "s/[./]//g" | sed 's/[0-9]*//g'` ; echo "$E"; done

or the simpler command, note the usb- prefix and symlinks:

Code: [Select]
ls -lh /dev/disk/by-id/


Then create a bootable usb from the ISO image.  dCore ISO images have had isohybrid used on them so they can be written to a USB device via the dd command.  Just be sure of your device name.  If sdb is your USB device, then use the following:

Code: [Select]
dd if=dCorePlus-stretch.iso of=/dev/sdb bs=1M

Then reboot with the USB device.

Once booted, do the following in a terminal:

Code: [Select]
sce-import dCore-usbinstall
sce-load dCore-usbinstall


Then run "sudo dCore-usbinstall" in a terminal.   dCore-usbinstall will let you choose from a list of USB devices to install to, just install to the same one as booted from as it will not be mounted after booting.  Choose a dCorePlus port if it was needed before.  Then reboot.

You will now have a USB key with dCore installed with a TCE directory on that USB device.  Then start importing packages. 

A note:  Use "RAM=TRUE" in /etc/sysconfig/sceconfig and make a backup or use the "sce-import -r" option so the package importing work with it's many file writes happends in RAM to prolong the life of the USB drive. 
« Last Edit: March 30, 2018, 07:05:54 PM by Jason W »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: dCore-usbinstall
« Reply #3 on: March 31, 2018, 11:06:27 AM »
Hi Jason
How come that on first reboot the dCore-plus is not mounted?
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #4 on: March 31, 2018, 12:23:22 PM »
It is that way be design, with the TCE directory in /tmp so you can use that same usb for the dCore-usbinstall installation.  Otherwise you would have to use a second usb drive for installing to.  The dCorePlus-stretch.sce extension that is the difference between the regualar dCore and dCorePLus is located in /tmp/builtin.

Using dd to 'burn' an iso to a usb drive creates an iso9660 filesystem of the entire device which is read only and you can't create a TCE directory on it or write any new files or directories to it.  So the booting of the iso9660 filesystem and leaving it unmounted makes sense.   

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: dCore-usbinstall
« Reply #5 on: April 02, 2018, 08:30:22 AM »
Hi
downloaded and mounted dCorePlus-stretch.iso I see that there is no sce inside, everything is in the initrd, so I understand why if I burn it on a usb and then boot, the usb can be unmounted
« Last Edit: April 02, 2018, 08:35:11 AM by jls »
dCore user

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #6 on: April 12, 2018, 04:29:33 PM »
dCore-usbinstall has been updated to include "waitusb=8" in the boot command line of the resulting usb install so it works for everyone and recognizes the TCE directory on the usb and loads the extensions as expected with no intervention.   Updated for both x86 and x86_64.   

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #7 on: April 13, 2018, 02:15:24 PM »
dCore-usbinstall has been updated to include prompting the user to specify the max wait time of waitusb in seconds and that will be used with the label of the partition. 

If you choose xenial as your usb partition label, and 10 as your maximum timeout, the boot command line will include it like the following:

waitusb=10:LABEL=xenial

The max number of seconds is only that, the boot continues without delay once the usb device by that label name has been found by the system, usually a couple of seconds or so. 

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: dCore-usbinstall
« Reply #8 on: April 13, 2018, 05:26:06 PM »
Hi Jason W
I don't see the point in giving the user a prompt for the amount of wait time. Someone not knowing any better might choose
too low a time and cause themselves problems. As you yourself point out, by using the following format:
Code: [Select]
waitusb=10:LABEL=xenialthe boot process continues the moment the USB device is ready. So why not just default to a worst case number that covers
even the slowest hardware. There's no penalty for using a generous value like 20 or 30 seconds.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #9 on: April 13, 2018, 05:54:09 PM »
Rich, you are right.   Why not 30 seconds.  No performance penalty while being sure to cover all hardware scenarios.


Default max wait time is set to 30 seconds with no prompt for it, no boot speed lost but potential errors in choosing that value are avoided. 


dCore-usbinstall is reposted with above change, x86 and x86_64.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #10 on: April 15, 2018, 06:40:11 PM »
dCore-usbinstall has been updated to include the option to use release candidates as well as releases.  Also, if there is no valid usb device available, the utility exits at the beginning rather than after the needed downloads have taken place.


Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #11 on: April 17, 2018, 08:16:36 PM »
dCore-usbinstall now does not exit at the begenning if there is not a valid USB drive available upon launch.  Later in the process, one can choose from available USB devices and if none available or a change is wanted, there is a rescan option that can be used which will prompt the user to insert a USB key before returning to the same menu to choose a USB device.  The rescan option can be used until a USB device is chosen or exiting. 
« Last Edit: April 17, 2018, 08:26:42 PM by Jason W »

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: dCore-usbinstall
« Reply #12 on: April 23, 2018, 01:51:12 PM »
That worked great!  Pretty slick Jason!

Problem *for me* is pure UEFI boot.  (and secure-boot disabled of course)

Seems like older machines, or newer machines that have the CSM fallback option, will boot dCore (and TC) with either the dd'ed 9660 cd filesystem, or with the installed ext2 format using dCore-usbinstall.  No problem.

BUT, stick to a pure UEFI only environment, (secure-boot disabled natch), and it won't recognize the dCore-usb install.  Like my Acer 114 laptop, which has no csm fallback option.

I recognize that TC and dCore don't support all pc hardware - in this instance I'm going to research alternative boot managers I think and see what I can do to get them to play nicely with dCore and TC without having to use the csm fallback (which is not even present on my Acer)

Still, nice job on the dCore-usbinstall script.  That was awesome watching it do it's thing.

« Last Edit: April 23, 2018, 01:52:47 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore-usbinstall
« Reply #13 on: April 23, 2018, 05:33:00 PM »
Hi PDP-8

I don't have UEFI hardware though I have what is to me a nice newer machine, but I have read here in the Tinycore forum as well as on the web about UEFI and how to install to a usb stick with support for it.  I have done some trial runs with the command line and so far so good, seems simple enough.  I will aim to script a UEFI option into dCore-usbinstall hopefully in the coming days. 


Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: dCore-usbinstall
« Reply #14 on: April 23, 2018, 08:36:33 PM »
Awesome!  No rush.  I have to manage my data limits anyways, so even with dCore I have to keep an eye on things and can't keep on downloading the iso over and over. 

Hmmm.. would a local iso option for dCore-usbinstall be useful so I can burn it over and over from another filesystem in case things go wrong for whatever reason?

I also caught something complaining during the boot about ext3 not supporting certain features, which I guess is normal considering the filesystem on the stick is now ext2...  I just let the ext3 complaint slide and everything seems to be working (on a csm-enable box...)

Thanks for working on this stuff!
That's a UNIX book! - cool  -- Garth