WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: usb dCore image  (Read 3942 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
usb dCore image
« on: September 22, 2015, 10:11:26 PM »
I can't find the thread, but I remember a request for also including a usb bootable dCore image along with the rest of the downloads.

I have used 2 ways:  one is Unetbootin which is a large app but does it easy, failsafe, and flawless.

Another is to run "isohybrid" against the .iso image and then it can be copied to USB via the user with a similar command like below:

dd if=dCore-wheezy.iso of=/dev/sdb

Assuming /dev/scb is your usb.  Very important with this command not to enter the wrong device.   Much more newbie friendly to use Unetbootin as it only lists USB devices to choose from for installation. 
 
I can easily run isohybrid against the ISOs  before uploading to allow both CD burning as well as expert users calling on the dd command to install on USB.  If there are other formats wanted or we simply want isohybrid run against the ISOs to allow installation to USB without having to import anything, let me know.   

Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: usb dCore image
« Reply #1 on: September 23, 2015, 01:50:22 PM »
IMHO this is a major step towards simplifying the first steps with dCore. Great work, Jason! I would highly appreciate if the ISO-files were ran against Isohybrid. I would eventually make that a starting point of a new beginner's installation in the wiki.

The tool is new to me but it sure looks greatly useful. From a quick glance over its (Ubuntu) man-page I see that there is an option to build an EFI-bootable image -- at least with version 6 of Syslinux. That sound very useful, although I do not know how many people might be using it as of just now.

I do not have such a machine ready to test it. (And to be honest, I did not fully grasp the respective explanations on the Sylinux page on Isohybrid.) What do others think of this?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: usb dCore image
« Reply #2 on: September 23, 2015, 02:05:52 PM »
Using isohybrid ISOs, I could create a small command line utility that would install them with the dd command.  A menu based one that shows a list of available USB drives that are inserted in the machine, and you choose one of them.

That would require no additional imports for the user, could be run with just the base system running.  I am not familiar with the graphical usb install tool in Core, but a small utility would be much easier for me to create and maintain.  And this way the end user does not enter a typo in the dd command and overwrite a hard drive partition by accident.

I will read up more on the EFI image.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: usb dCore image
« Reply #3 on: September 23, 2015, 11:07:10 PM »
I have uploaded isohybrid ISOs to the release candidates area.  Also, I have made a script that installs an isohybrid ISO to a usb below.  You choose the iso, then choose the USB device.  The only thing is that this makes the USB like a CD ISO in that you have to choose a TCE directory outside of the chosen USB.  Still viable, but I will also make a USB install like Unetbootin that lets you use the USB for the TCE directory. Below and attached is the install script, run it with an ISO downloaded from the release candidates area ISOs that have been run with isohybrid.

I hesitate to tell new users to use the dd command to try dCore on USB because of the risk, so the script makes it safer.

Code: [Select]
#!/bin/sh
# (c) 2015 Jason Williams


> /tmp/usbinstall
> /tmp/usbinstalliso

if [ -z "$1" ]; then
if ls *.iso > /dev/null 2>&1; then
ls *.iso > /tmp/usbinstalliso
echo quit >> /tmp/usbinstalliso
else
echo "Please specify an ISO to install or one needs to exist in the current directory."
exit 1
fi
cat /tmp/usbinstalliso | sort | uniq | select "Select the ISO you want to install." "-"
read ISO < /tmp/select.ans
if [ "$ISO" == "q" ] || [ "$ISO" == "quit" ]; then
echo "Exiting.."
exit 1
fi
else
ISO="$1"
fi



for I in `ls /dev/disk/by-id/ | grep usb`; do readlink /dev/disk/by-id/"$I" | sed 's/[0-9]*//g' | sed "s/[.-/]//g" >> /tmp/usbinstall; done
echo "quit" >> /tmp/usbinstall
uniq /tmp/usbinstall | select "Select USB device you want to install dCore to.  WARNING: This will wipe that USB drive of existing data." "-"
read USB < /tmp/select.ans 
if [ "$USB" == "q" ] || [ "$USB" == "quit" ]; then
echo "Exiting.."
exit 1
fi
echo " "
echo -n "You are about to write "$ISO" to the USB drive /dev/"$USB".  DO NOT REMOVE USB UNTIL SUCCESS MESSAGE APPEARS. Are you sure you want to continue? (y/N): "
read ans
if [ "$ans" == "y" ] || [ "$ans" == "Y" ]; then
echo " "
dd if="$ISO" of=/dev/"$USB"
echo " "
echo ""$ISO" written successfully to /dev/"$USB"."
exit 0
else
echo "Exiting.."
exit 1
fi



Offline sm8ps

  • Sr. Member
  • ****
  • Posts: 338
Re: usb dCore image
« Reply #4 on: September 24, 2015, 12:11:30 PM »
Looks good! The script is a great simplification over any step-by-step instructions.

AFAICT this should work on any standard Linux installation. I shall test it and eventually include it into the wiki (provided the copyright holder should agree.) :) Anyways it will take some time.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: usb dCore image
« Reply #5 on: September 24, 2015, 02:59:14 PM »
I am looking into having extlinux as an option, like installing with Unetbootin does.  That is, give an choice of isohybrid type of USB install or an extlinux one, and choice of USB drive.  I can put this in base and dCorePlus can have the syslinux package installed and regular dCore can just simply import extlinux and proceed.  I by far prefer the extlinux install as the USB partition is writable and viewable.

Like the one posted, this is one that will work on any distro that has extlinux installed. 

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: usb dCore image
« Reply #6 on: September 24, 2015, 09:32:03 PM »
Actually, silly me, isohybrid has always been run on the ISOs, just needed to review my scripts a little closer. 

Offline pjz

  • Newbie
  • *
  • Posts: 17
Re: usb dCore image
« Reply #7 on: September 26, 2015, 11:18:57 PM »
I must admit that I cheated and used the tce installer to build a USB image for me and then put the dCore-jessie files on it and then modified the extlinux.conf... just in case this sparks an idea in anyone's brain.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
dCore-usbinstall
« Reply #8 on: October 11, 2015, 10:00:20 PM »
I have uploaded a custom package called dCore-usbinstall.   You choose the usb device from a list based on what is known as usb in the system.  Then choose the dCore port.  Ext2 is the only filesystem supported now, fat32 will come.  The usb drive is formatted by this utility, so if there is existing data or multiple partitions you are wanting to work around then use Unetbootin or another app that is better suited for that.   This is to provide a simple way to install dCore to a USB key.  There is a choice to include the wireless extension for a given port so one can boot with it and be wireless enabled.  One has to be running dCore with a working network connection to use this utility. 

This does not work on dCore-wily for now, though you can install dCore-wily by running this utility on other dCore x86 ports.
« Last Edit: October 11, 2015, 10:03:08 PM by Jason W »