SalixLive XFCE 14.1 beta3

User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: SalixLive XFCE 14.1 beta3

Post by laprjns »

Here a patch that fixes the problem with the script not terminating when it detects only a sda

Code: Select all

--- /home/rich/install_on_usb.sh.bu
+++ /home/rich/install_on_usb.sh
@@ -106,17 +106,19 @@
 for disk in $disks; do
  if [ "$disk" != "sda" ]; then
 	installmedia=/dev/$disk
+ else installmedia="" 	
  fi
 done
-echo "========================================="
-echo "										   "
-echo "Removable device is $installmedia        "
-echo "										   "
-echo "========================================="
-
-if [ "$installmedia" == NULL ]; then
+
+if [ "$installmedia" == "" ]; then
 	echo "There is no removable usb device attached to your system"
 	exit
+else
+	echo "========================================="
+	echo "										   "
+	echo "Removable device is $installmedia        "
+	echo "										   "
+	echo "========================================="
 fi
 }
It not the answer to multiple hard drive issue, but it at least it does not allow the possibility of installing to /sda.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

And also the line above disks=`cat /proc/partitions | sed 's/ */:/g' | cut -f5 -d: | sed -e /^$/d -e /[1-9]/d -e /^sr0/d -e /loop/d -e /$bootdevice/d` has to changed to
disks=`cat /proc/partitions | sed 's/ */:/g' | cut -f5 -d: | sed -e /^$/d -e /[1-9]/d -e /^sr0/d -e /loop/d`
since the $bootdevice does not exist
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

laprjns wrote:It not the answer to multiple hard drive issue
Other distro's let user provide the usb device
So can remove usb detection function and use script like this
sudo sh install_on_usb.sh --usb isoname /dev/sdx
This answers to multiple hard drive issue
Of cource script can detect /dev/sdx and when user write /dev/sda will terminate and will not allow the possibility of installing to /sda.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

Please try this script.
initrd_on_usb.sh

how to use it
Installation to usb
sudo sh install_on_usb.sh --usb salixlive64-xfce-14.1-beta3.iso /dev/sdx (x=b,c etc)

For persistent
sudo sh install_on_usb/install_on_usb.sh --persistent 64 /dev/sdx (x=b,c etc)

1. run the script with no usb attached
2. run the script with /dev/sda
3. run the script with usb attached on e.g /dev/sdb but write /dev/sdc as parameter.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: SalixLive XFCE 14.1 beta3

Post by mimosa »

Code: Select all

mimosa[~]$ sudo sh install_on_usb.sh --usb salixlive64-xfce-14.1-beta3.iso /dev/sdc
There is no removable usb device attached to your system
mimosa[~]$ parted -l
Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdc: 8006MB
sda and sdb are hard disks, calling parted as normal user only shows usb.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

mimosa wrote:

Code: Select all

mimosa[~]$ sudo sh install_on_usb.sh --usb salixlive64-xfce-14.1-beta3.iso /dev/sdc
There is no removable usb device attached to your system
mimosa[~]$ parted -l
Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdc: 8006MB
sda and sdb are hard disks, calling parted as normal user only shows usb.
yes because sdb is mounted by the user. So parted can read it.

Please download again the script i have done some corrections.
initrd_on_usb.sh
md5sum is install_on_usb.sh.md5

Also try to execute the script when have two usb stick plugged in as /dev/sdb, /dev/sdc and put as parameter /dev/sde
Or having one usb on /dev/sdb and user type /dev/sdc
Or type /dev/sda then script will not run.
Look on function check_device
type sh install_on_usb.sh --help to see the syntax
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: SalixLive XFCE 14.1 beta3

Post by laprjns »

djemos wrote: Also try to execute the script when have two usb stick plugged in as /dev/sdb, /dev/sdc and put as parameter /dev/sde
Or having one usb on /dev/sdb and user type /dev/sdc
Or type /dev/sda then script will not run.
Look on function check_device
type sh install_on_usb.sh --help to see the syntax
I tested the new script with three flash drives, using many combinations, plugging and unplugging various combinations. It away tried to install to the device I passed if it was plug in.

In summary it works here.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

Thank you laprjns
also here it is the patch for new script so can see the differences from old one.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

gapan wrote:It would be nice if the script could be run from a mounted directory as laprjns was trying without any problems.

And I guess the script could detect the architecture from the file name. If it starts with salixlive64 then it's 64 bit, otherwise it's 32.
Both have been done in new script.
I open iso image with isomaster delete the previous script and added the new one. Then recreate the iso.
Next i mount the new iso under /tmp/iso, cd to /tmp/iso/boot folder and execute the script.

Code: Select all

sudo sh install_on_usb.sh --usb /tmp/salixlive-xfce-14.1beta3.iso /dev/sdb
iso copied on usb and persistent file is created.
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: SalixLive XFCE 14.1 beta3

Post by laprjns »

Regarding the two uefi menu boot options, I have completed some additional testing to determine why there are two.
djemos wrote:To see what is not need. Please do the following.
Go on usb and
1. moove somewhere on your system initrd.gz and vmlinuz from EFI/BOOT folder
then try to boot with usb.

2. Copy again back the above files to EFI/BOOT folder and remove the files initrd.gz and vmlinuz from boot/ folder
then try to boot again
I did this testing and found that it does uefi boot from the /EFI/BOOT/ directory. Both the initrd and vmlinuz files need to be in this directory to boot. Having these files in the /boot/ directory makes do difference, the system boots with or without those files in the boot directory.
The reason why the uefi firmware generates two boot options, is because the install_on_usb script creates two valid FAT partitions on the USB stick. Here's the partition scheme that the script creates on my USB Flash drive.

Code: Select all

rich[~]$ parted -l
Model: ADATA USB Flash Drive (scsi)
Disk /dev/sdb: 4058MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 
Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  34.6MB  33.6MB  fat16        EFI System            boot
 2      34.6MB  4058MB  4023MB  fat32        Microsoft basic data 
The uefi specification requires that the firmware automatically create "handlers" (boot menu options) for all block devices that support FAT12, FAT16 or FAT32 filesystem. When one of these options is selected the firmware looks for a boot image (bootx64.efi) in the /EFI/BOOT/ path. If the path doesn't exist or there is noimage it defaults to booting another device. In this case, even though partition 1 is empty, it is a valid FAT formatted partition so a boot option gets automatically generated. Since there nothing in it to boot, it boots the default OS. Deleting the first partition resulted in getting only one boot option in the uefi menu which did successfully boot into the elilo menu and then into Live.
So in summary, there should only be one FAT partition, and it required to have a /EFI/BOOT/ directory with the boot image. Both the initrd and kernel image needs to be in this directory also.
Hope this helps.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
Locked