SalixLive XFCE 14.1 beta3

djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

script detects the architecture from salixlive64 If it has 64 is 64bit. if it is not is 32
to specify also 32 or 64 as parameter is for user to know what he is doing
i just have to mount iso in a unique mountpoint. so it will work as laprjns did it
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

mimosa script detect the usb. if user specify the usb device is dangerous . a lot of users don't know anything about devices.
as it is script is working fine
i will correct the mount point remove the 64 or 32 bit and correct the help usage message
of cource the name has to be salixlive64 or salixlive otherwise script will not work
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

i removed 64 or 32 parameter from --usb
but for --persistent needed because of different partitions created in usb for uefi and 32bit legacy mode at installation time.
so script detect the right partition and there create the persistent file
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:mimosa script detect the usb. if user specify the usb device is dangerous . a lot of users don't know anything about devices.
as it is script is working fine
So I did some testing to see how the script handles some potential scenarios:
No removable media plugged in
I started the script with no removable media plugged in with a single hard drive (/dev/sda) installed and got this message:
Image
As you can see it says that its going to install Live, but the drive is not defined. The messages is very confusing, especially to users who don't know any thing about devices. At this point I did as the message suggested and evaluated if I knew what I was doing and putting my pride aside, came to a resounding conclusion as no :shock: . I pressed the "No" button and the script terminated. I would think that this needs to be change such that if the script cannot detect any removable media, then it sets a message saying so and terminates.

Multiple removable drives.
I plugged in up to four USB flash drives in several different combinations. In all cases the script selected the last drive that was plugged in, no matter which drive letter it was assigned. My first though is that this is probably good, since most likely the users had just plugin the USB drive take he wants install Live on, but in the end should the script be making this decision?

Multiple Hard drives and no removable disk
I can' test this scenario since I don't have any system with more than one hard drive installed. What would happen if a system had two hard drives with device names /dev/sda and /dev/sdb. Would the script detect /dev/sdb as the targeted removal drive?
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
gapan
Salix Wizard
Posts: 6238
Joined: 6. Jun 2009, 17:40

Re: SalixLive XFCE 14.1 beta3

Post by gapan »

Great testing laprjns ! The last problem could be tested in a VM with virtual hard drives I guess.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: SalixLive XFCE 14.1 beta3

Post by mimosa »

I tested with two hard drives and a USB plugged in, and the script chose correctly. I'll try again with just two hard drives.

Regarding not letting the user specify the device, I'd say this *is* a script being called from the CLI ... and my suggestion is only that specifiying the device shoud be an optional extra parameter, so if you run the script and don't like its choice, it can be run again to override that choice.

EDIT

Unfortunately, with two hard drives connected and no USB stick, sdb is chosen to install Live.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

i start the script with no removable device and got these
djemos[64]$ sudo sh src/live/boot/install_on_usb.sh --usb /tmp/salixlive-xfce-14.1-beta3.iso 32
install_on_usb.sh --persistent 32|64
install_on_usb.sh --usb isoname 32|64


and
djemos[64]$ sudo sh src/live/boot/install_on_usb.sh --usb salixlive64-xfce-14.1-beta3.iso 64
install_on_usb.sh --persistent 32|64
install_on_usb.sh --usb isoname 32|64
djemos[64]$

Returned the syntax. In any case script don't start.

For Multiple removable drives, if someone can write the script to show the devices and user choose one then he is welcome.
Also it will be more easy to write the script so user has to specify the device. Then it is up to user to see which is the device. It might be /dev/sdb or /dev/sdc etc.
We can go with this but it is up to user, if he choose the wrong device.
I have run the script from my running salix system and always choose the usb device to install. If i have no device pluged in script shows the help syntax and don't run.

Mimosa. Yes if you have two hard drives then because second is sdb then this is a problem. I agree.

So, I will look in the code and do my best. :)
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:i start the script with no removable device and got these
djemos[64]$ sudo sh src/live/boot/install_on_usb.sh --uefi /tmp/salixlive-xfce-14.1-beta3.iso 32
install_on_usb.sh --persistent 32|64
install_on_usb.sh --usb isoname 32|64
Do you really mean --uefi?

Code: Select all

rich[~]$ sudo sh install_on_usb.sh --uefi Downloads/salixlive64-xfce-14.1-beta3.iso 32
Password:
install_on_usb.sh --persistent 32|64
install_on_usb.sh --usb isoname 32|64
However if I use --usb i get the following

Code: Select all

rich[~]$ sudo sh install_on_usb.sh --usb Downloads/salixlive64-xfce-14.1-beta3.iso 32
Sorry, Downloads/salixlive64-xfce-14.1-beta3.iso arch is 64 while parameter is 32
You provide the wrong iso image
Now with using the correct option, --usb and specifying the correct arch with no removable devices plug in:

Code: Select all

rich[~]$ sudo sh install_on_usb.sh --usb Downloads/salixlive64-xfce-14.1-beta3.iso 64
Which result in:
Image
laprjns wrote: In all cases the script selected the last drive that was plugged in, no matter which drive letter it was assigned.
Since the scrip always selects that last drive that was plugged in, maybe the first thing the scrip should do is request the user plug in (or unplug then replug) the flash drive then execute the code that detects the drive. This may fix both of these problems.
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: SalixLive XFCE 14.1 beta3

Post by mimosa »

maybe the first thing the scrip should do is request the user plug in (or unplug then replug) the flash drive then execute the code that detects the drive.
That sounds like an excellent idea. I also think it would be good if the script could tell what is a USB device and what is a hard disk. And only offer the former.

However I don't know if that's possible ...

Is there some robust way of making sure the user really did plug something, before continuing? That would surely provide reasonable protection against user error or cussedness.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: SalixLive XFCE 14.1 beta3

Post by djemos »

laprjns, it was a mistyping i write --usb not --uefi.
The script examines if device is sda and if not is executed.
However it does not examine if device is hda so in this case and i think you might have a hda hard disk can executed and the screen appears.
By the way I am working in the script code.

I have a /dev/sda disk and execute the script with no usb plug in. The window appeared and i said yes then script return install_on_usb.sh --usb iso_name help message.
It is not executed.

On Line 354 this line
if [ -f "$isoname" ] && [ -b "$installmedia" ]; then
prevent the installation.
What i had in mind when i was writing the script is in any way to not executed to not removable disks.
But i agree this has to be more clear to users. So need a little more work.
Locked