instonusb writes GPT to usb on BIOS computer

You have a problem with Salix? Post here and we'll do what we can to help.
ongefar
Posts: 11
Joined: 22. Feb 2023, 18:36

instonusb writes GPT to usb on BIOS computer

Post by ongefar »

instonusb installer doesn't see MBR ("not present"), then writes GPT to target usb drive.

Code: Select all

one[~]$ sudo instonusb

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password: 
=========================================
										   
Removable device is /dev/sdc        
										   
=========================================
GPT fdisk (gdisk) version 1.0.8

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries in memory.

Command (? for help): b	back up GPT data to a file
c	change a partition's name
d	delete a partition
i	show detailed information on a partition
l	list known partition types
n	add a new partition
o	create a new empty GUID partition table (GPT)
p	print the partition table
q	quit without saving changes
r	recovery and transformation options (experts only)
s	sort partitions
t	change a partition's type code
v	verify disk
w	write table to disk and exit
x	extra functionality (experts only)
?	print this menu

Command (? for help): Partition number (1-128, default 1): First sector (34-60620766, default = 2048) or {+-}size{KMGTP}: Last sector (2048-60620766, default = 60620766) or {+-}size{KMGTP}: Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Microsoft basic data'

Command (? for help): 
Recovery/transformation command (? for help): 
WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): 
Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default 07): Set the bootable flag? (Y/N): 
GPT partition #2 does not exist or is too big; skipping.

Unused partition space(s) found. Use one to protect more partitions? (Y/N): Your option? (Y/N): 
Recovery/transformation command (? for help): 
Recovery/transformation command (? for help): b	use backup GPT header (rebuilding main)
c	load backup partition table from disk (rebuilding main)
d	use main GPT header (rebuilding backup)
e	load main partition table from disk (rebuilding backup)
f	load MBR and build fresh GPT from it
g	convert GPT into MBR and exit
h	make hybrid MBR
i	show detailed information on a partition
l	load partition data from a backup file
m	return to main menu
o	print protective MBR data
p	print the partition table
q	quit without saving changes
t	transform BSD disklabel partition
v	verify disk
w	write table to disk and exit
x	extra functionality (experts only)
?	print this menu

Recovery/transformation command (? for help): 
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
mkfs.fat 4.2 (2021-01-31)


Copying live system on /dev/sdc1


--- Making the USB drive '/dev/sdc' bootable using syslinux...
=========================================
										   
Removable device is /dev/sdc        
										   
=========================================
installdevice=/dev/sdc
/dev/sdc1

Creating persistent file 'persistent'. Please wait ...

0+0 records in
0+0 records out
0 bytes copied, 8.1423e-05 s, 0.0 kB/s
--- Encrypting the container file with LUKS, passing the PASS; 
--- Unlocking the LUKS container, passing the PASS;
8155136+0 records in
8155136+0 records out
4175429632 bytes (4.2 GB, 3.9 GiB) copied, 677.945 s, 6.2 MB/s
mke2fs 1.46.5 (30-Dec-2021)
64-bit filesystem support is not enabled.  The larger fields afforded by this feature enable full-strength checksumming.  Pass -O 64bit to rectify.
Creating filesystem with 1019392 4k blocks and 254976 inodes
Filesystem UUID: 7130ed81-e464-4928-a3b0-bece665746ef
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

tune2fs 1.46.5 (30-Dec-2021)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Setting reserved blocks percentage to 0% (0 blocks)

The persistent file persistent is ready.
I don't expect this installation to boot. I will repeat the installation, with the change of setting the boot flag on the single fat32 partition. If, however, I observe the installer write GPT to usb drive, I'm going to abort the installation.
ongefar
Posts: 11
Joined: 22. Feb 2023, 18:36

Re: instonusb writes GPT to usb on BIOS computer

Post by ongefar »

Happy to report that both installs succeeded. Setting the boot flag on the partition was unnecessary and most likely overwritten. Where the boot flag normally appears in Gparted, there is "msftdata" instead of boot. Thereafter, I installed most of the apps I wanted, and uninstalled LibreOffice, but I'm not sure I really got rid of it. I'm running Tor Browser from the bundle, no problem.

There are some things I would like to change, such as eliminate the Language selection boot screen or greatly shorten the timer on the first screen. I would like to change the boot order on the second boot menu, placing Salix Live (Persistent) first and just below it, Salix Live, which is in the top position now, and shorten the timer for the second boot screen to maybe 7 seconds. Probably, the most annoying event is the interruption of the boot with a prompt to enter a passphrase for the encrypted Persistent file. Had I a choice, I would not have selected encryption in the first place, much less put a password on the Persistent file. I would like to disable that passphrase prompt. I'm not sure how to do it. I did a search for passphrase, but no result.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: instonusb writes GPT to usb on BIOS computer

Post by djemos »

Run instonusb again and recreate the persistence file without to type a phrase for encryption.
encryption is used in case you loose the usb and someone find it, to cannot read your critical data.
Or using the script install_on_usb.sh included in the iso
install_on_usb.sh --persistent 32|64 device (where device is /dev/sdb or /dev/sdc)
e.g. install_on_usb.sh --persistent 64 /dev/sdb

You can change the boot order on the second boot menu by editing the menu_en.cfg or edit the menu for your language in the usb and move the lines for persistence to be first choice.

Insonusb do a frugal install (just copying the iso) (used to boot the iso from a usb and not burning the iso on a dvd) and also then can use this usb to boot with it and install salix to internal or external disk or usb (real installation) Doing a real installation you have to use gparted from sli to prepare the partitions and set the boot flag if you use EFI and gpt partition table.

instonusb after copying the iso make the usb bootable.
ongefar
Posts: 11
Joined: 22. Feb 2023, 18:36

Re: instonusb writes GPT to usb on BIOS computer

Post by ongefar »

I'm sorry, I don't see a setting on the instonusb gui to de-select encryption. I have been leaving the passphrase empty for the last three installs, but this doesn't prevent the prompt from interrupting the boot, and ignoring the passphrase, leaving it blank, doesn't stop encryption. I don't want encryption, I don't want the passphrase, and I don't want the prompt during boot. Another thing, I tried to access what I believed to be the Persistent file's (usb) icon on desktop. I was not able to gain access to the drive using known passwords and no password (blank passphrase). I suppose I would be able to inspect that drive if I had the passphrase, or if there were no encryption. I reinstalled Salix Live because the Persistent file was too large, and at some point Salix wouldn't shutdown, getting hung on "Remounting root file system, read only:" I read that Salix shutdown hangs there for a long time if the Persistent file is too large. The poster recommended a Persistent file size of 2.6 GB, to allow enough storage space yet minimize the delay at shutdown, which delay is probably the save operation (?). I don't see a setting to de-select Persistent file encryption, which I assume is the default for Salix.

viewtopic.php?f=16&t=7543&p=43845&hilit ... nly#p43845

Opinion: Persistent vs Persistence. If I could vote on the terminology, as an English speaker, I would recommend using the word Persistence to describe the casper-rw file that saves changes. I know it's odd to see a noun used as an adjective, but there's no point using two words for the operation. I'm strongly recommending that "Persistence file" is the better usage in English.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: instonusb writes GPT to usb on BIOS computer

Post by djemos »

You found a bug. While the install_on_usb.sh script included in iso in boot folder is working fine, the gui tool instonusb because of a forgotten misstyping $ in a variable always encrypted the persistent file.
Download the upgraded txz file from here
install it with

Code: Select all

sudo spkg instonusb/instonusb-2.0-x86_64-3dj.txz
Run again the instonusb tool and recreate the persistent file. No more prompt at boot time for persistent file without encryption.
Thanks.

I suggest again: Do not use persistent. boot with the live usb and do a real installation to another usb stick using the sli.
You will have salix to run fast like to have installed in your hard disk. You will have a system which can upgrade always with you, in your pocket.
ongefar
Posts: 11
Joined: 22. Feb 2023, 18:36

Re: instonusb writes GPT to usb on BIOS computer

Post by ongefar »

I did a hard drive install to usb from boot usb. The result is a laggy Salix, where there's a 10-second lag on a mouse click. It's unusable.

So I inspected the code for the install_iso_on_usb.sh script. I can see the script gives a choice for encryption. Unfortunately, I don't understand the format, which is:
install_iso_on_usb.sh --usb isoname device
I copied the iso to /one/Downloads then opened a terminal in Downloads and thus

Code: Select all

one[Downloads]$ sudo install_iso_on_usb.sh --persistent salixlive64-xfce-15.0.iso /dev/sdd
Password: 
=========================================
										   
Removable device is /dev/sdd        
										   
=========================================
one[Downloads]$ 
I'm assuming the "device" required is the target device. What am I doing wrong?
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: instonusb writes GPT to usb on BIOS computer

Post by djemos »

You are confused.
The script install_on_usb.sh included in iso is running from command line.
first run it to create the live usb (frugal install). it just copy the iso to usb and make it bootable. it is used then for laptops without cd/dvd writer to boot and install salix using sli to hard disk.
Create the live usb (frugal installation)

Code: Select all

  sudo mkdir /tmp/iso
  sudo mount -o loop /one/downloads/salixlive64-xfce-15.0.iso /tmp/iso
  cd /tmp/iso/boot
  sudo sh install_on_usb.sh --usb /one/downloads/salixlive64-xfce-15.0.iso /dev/sdd
  cd ~/
  sudo umount /tmp/iso
Create the persistent file

Code: Select all

sudo install_on_usb.sh --persistent 64 /dev/sdd
To install to usb as in hard drive. Boot with the usb you have created before. (No need to create the persistence file to do a real installation)
After booting in live environment plug in another clean usb.
Then run sli
click on partitions. Create the partitions in the clean usb as you do when install to hard disk. Read the startup guide if you create a gpt partition table and create efi partition. Have to sign the efi vfat partition bootable. If create a msdos and only a linux partition no need to sign anything.
Then close the gparted, pick up the partition in usb to install salix. Grub is the default. Do not choose (e)lilo. Set clock, locale, user and password for user and proceed to installation.


The install_iso_on_usb.sh is used from instonub gui. You do not use it from command line. It take different parameters through gui front end.

Code: Select all

sudo install_iso_on_usb.sh --usb isofile device usbfstype iso_arch usblabel 
where isofile=/one/downloads/salixlive64-xfce-15.0.iso device=/dev/sdb or /dev/sdc etc usbfstype=vfat iso_arch=64 usblabel=LIVE
e.g.
sudo install_iso_on_usb.sh --usb /one/downloads/salixlive64-xfce-15.0.iso /dev/sdb vfat 64 LIVE

Code: Select all

sudo install_iso_on_usb.sh --persistent iso_arch, device, persistent_size, passphrase
(if you do not want encryption then set passphrase="") Persistent_size is in MB.
e.g.
sudo install_iso_on_usb.sh --persistent 64 /dev/sdb 300 ""

Download again the file and reinstall it. I have corrected the help if user run it from command line which is not suppose too.
ongefar
Posts: 11
Joined: 22. Feb 2023, 18:36

Re: instonusb writes GPT to usb on BIOS computer

Post by ongefar »

Well, I used instonusb, the version you corrected re encryption, to copy iso to usb. It was good (no encryption, no prompt), until I put desired apps on it with Gslapt. Unfortunately, there comes a point when the full install-copy just bogs down with lag. So I would like to see the basic Salix. More particularly, I would like to see Basic SalixLive64. However, sli only performs a hard drive install for me. sli doesn't copy Salixlive64 to usb in my case (see recurring error in OP). So far, for my hardware, Salix installations which treat the usb as a hard drive are unacceptably laggy. I want to copy the Basic version of SalixLive64 to the usb with instonusb. Of course, I am requesting a Basic SalixLive64 ISO. That's the way AntiX does it, that is, there is a downloadable ISO for the Basic version. (And AntiX provides a nice distro-specific Package Installer to quickly fill out the Basic OS to user's taste.) All I want is an ISO for Basic, so I can copy Salixlive64-xfce-basic to usb.

BTW, speaking of bogging down with lag, when I set up a salixlive usb by copying live iso to usb, I installed most of the apps I wanted. Then when I tried to update packages upon notification, Salix complained not enough space to perform update. At that time there were 26 GB free space on my usb drive. How is it I ran out of space? Is this "out of space" refusal to update packages because there isn't enough space on the Persistent file? Why did I get that error?
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: instonusb writes GPT to usb on BIOS computer

Post by djemos »

All these questions are well answered on pages 14-15 of salix_live_startup_guide
USB vfat formatted the persistent file can only be 4GB because of dos filesystem.
USB ext3,4 formatted the persistent file can be as long as you like. In the script the size is 14GB for a 16GB usb. Edit the script and change the value as you like for a 32 or 64GB usb

Real installation is same as installing in hard disk. (Installing to internal hard disk, you choose the linux partition like /dev/sdax, On usb is like /dev/sdmx where m=b,c,d and x=1,2,3
ongefar
Posts: 11
Joined: 22. Feb 2023, 18:36

Re: instonusb writes GPT to usb on BIOS computer

Post by ongefar »

The first persistent file I created was 3999 MB. The shutdown was too long. It may have exceeded 5 minutes, as I recall.
I did install as hdd to usb the basic version. I liked it. I believe that's what I want, and what I should have been working with all along. However, this installed version has no ethernet. I thought basic was supposed to have ethernet, but no wifi. This install has no network manager AFAICT. Unless I have USB ethernet dongle laying around, how am I going to use Gslapt without ethernet connection? Chicken and egg dilemma. So what is the default network manager for Salix xfce? I looked for connman, no, not that. Seem to recall mm or nm? You can correct me if you're so inclined, I already wiped that installation. I might have tried to create a ISO from OS, but I didn't want to duplicate that login. As a hard drive install there is too much lag, even in the basic. I think there may be a difference in speed between fully installed OS and apps, and an OS that decompresses on the fly. Something is making these two techniques differ in speed and responsiveness. So if someone could copy salixlive64-basic to usb and then generate an ISO (aka backup) from that, it would be very helpful. Djamel, I appreciate the detailed explanation of install_iso_on_usb. Just looking at all that code gives me brain fog.
Post Reply