antiX live usb maker PARTITION TABLE issue?

Message
Author
DevilMind
Posts: 11
Joined: Mon Dec 24, 2018 3:14 pm

antiX live usb maker PARTITION TABLE issue?

#1 Post by DevilMind »

antiX live usb maker PARTITION TABLE issue?

i have 32gb USB flash drive,
i want these 3 Partitions

sda1 - 29gb fat32 - data for Windows and MacOS
sda2 - 3gb ext4 - live usb antiX
sda3 - 50mb fat16 - esp boot antiX


Now the problem is, the Live USB Maker app in antiX gives me no option and my Data fat32 Partition is in end of Partition (sda3).

is there any App which gives us full control of where to make Live USB Partitions on USB Stick?

because FIRST Partition on USB STICK is always recognised on Windows and MacOS and Car Music Player.
This makes it very easy to carry my data and also live usb boot when needed. Both on same USB Stick.

all of above also required for MX Linux 18 and AntiX 17.4.1.

UPDATE on 29-07-2019 Mon:
Please can anyone help with this?
Is there a Terminal Command or Linux App which can simply:
1. Format my 32gb USB to:
sda1 fat32 to 28gb for Windows and Car Music Player
sda2 fat16 to 50mb EFI boot partition
sda3 ext4 to 2gb AntiX or MX Live USB partition

Please Note:
The partition rename from sda1 to sda3 Terminal Command is not helpful on Car Music Player.


waiting for your replies
Last edited by DevilMind on Sun Jul 28, 2019 3:56 pm, edited 1 time in total.

User avatar
towwire
Posts: 645
Joined: Fri Oct 15, 2010 12:15 pm

Re: antiX live usb maker PARTITION TABLE issue?

#2 Post by towwire »

Your are not booting Windows, Windows will use any data partition that is in a formatted it knows. I have a computer that has Windows 7 and XP on the same hard drive and each sees the other. As for antiX live someone else will have to answer that.

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: antiX live usb maker PARTITION TABLE issue?

#3 Post by BitJam »

I have not tried this (yet) but this is what I suggest you do. Use the command line live-usb-maker to make your live-usb. Use the --gpt option to create a gpt partition table and use the --size option to limit the amount of the usb stick we use or select the size interactively when the program runs. Then add your fat32 data partition and use the gdisk program to change the partition table numbering. In the expert menu there is a "t" (for transpose) option to swap the numbers of two partitions. You could use this once or twice to get the partition order you want. If you try this, please let us know if it works!

We used to use gpt as the default partitioning but Dell made some crazy machines that required us to only boot via legacy or only boot via UEFI if we used gpt. Strange but true.
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

User avatar
fehlix
Developer
Posts: 10309
Joined: Wed Apr 11, 2018 5:09 pm

Re: antiX live usb maker PARTITION TABLE issue?

#4 Post by fehlix »

BitJam wrote: Mon Dec 24, 2018 5:00 pm I have not tried this (yet) but this is what I suggest you do.
It works! :number1:
Used this to create :

Code: Select all

sudo live-usb-maker --gpt --size=50 --from=/ISO/MX-Linux/MX-18/MX-18_x64.iso
Reordered partitions using gdisk.
The manualy created FAT32 partion is accessible in Win10.
Boots in legacy BIOS/MBR mode and in UEFI mode.
Partitions as shown running Live:

Code: Select all

demo@mx1:~/Desktop
$ sudo lsblk -f /dev/sda
NAME   FSTYPE LABEL       UUID                                 MOUNTPOINT
sda                                                            
├─sda1 vfat   FAT32       D606-EC9E                            
├─sda2 ext4   MX-Live-usb 76699fe8-7975-489a-84eb-ab9216a92f58 
└─sda3 vfat   MX-uefi     CD20-C0AC                            
The partition order shown with fdisk indicates the manually create FAT32 is "physically" the last partition.

Code: Select all

demo@mx1:~/Desktop
$ sudo fdisk -l /dev/sda
Disk /dev/sda: 28,7 GiB, 30752636928 bytes, 60063744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 45FA149B-7D4D-45E8-8D6D-5A855F9D57D9

Device        Start      End  Sectors  Size Type
/dev/sda1  30029824 60061695 30031872 14,3G Microsoft basic data
/dev/sda2      2048 29927423 29925376 14,3G Linux filesystem
/dev/sda3  29927424 30029823   102400   50M EFI System

Partition table entries are not in disk order.
inxi system info in BIOS mode

Code: Select all

demo@mx1:~/Desktop
$ inxi -Fxz
System:    Host: mx1 Kernel: 4.19.0-1-amd64 x86_64 bits: 64 compiler: gcc v: 6.3.0 
           Desktop: Xfce 4.12.3 Distro: MX-18_x64 Continuum Dec 20  2018 
           base: Debian GNU/Linux 9 (stretch) 
Machine:   Type: Virtualbox System: innotek product: VirtualBox v: 1.2 serial: <filter> 
           Mobo: Oracle model: VirtualBox v: 1.2 serial: <filter> BIOS: innotek v: VirtualBox 
           date: 12/01/2006 
CPU:       Topology: Quad Core model: Intel Xeon E3-1240 V2 bits: 64 type: MCP arch: Ivy Bridge 
           rev: 9 L2 cache: 8192 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 27226 
           Speed: 3403 MHz min/max: N/A Core speeds (MHz): 1: 3403 2: 3403 3: 3403 4: 3403 
Graphics:  Device-1: InnoTek Systemberatung VirtualBox Graphics Adapter driver: vboxvideo 
           v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.19.2 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1600x900~60Hz 
           OpenGL: renderer: llvmpipe (LLVM 7.0 256 bits) v: 3.3 Mesa 18.2.6 direct render: Yes 
Audio:     Device-1: Intel 82801AA AC97 Audio driver: snd_intel8x0 v: kernel bus ID: 00:05.0 
           Sound Server: ALSA v: k4.19.0-1-amd64 
Network:   Device-1: Intel 82540EM Gigabit Ethernet driver: e1000 v: 7.3.21-k8-NAPI port: d000 
           bus ID: 00:03.0 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus 
           v: N/A port: d200 bus ID: 00:07.0 
Drives:    Local Storage: total: 60.64 GiB used: 20.8 MiB (0.0%) 
           ID-1: /dev/sda vendor: VirtualBox model: VBOX HARDDISK size: 28.64 GiB 
           ID-2: /dev/sdb vendor: VirtualBox model: VBOX HARDDISK size: 32.00 GiB 
Partition: ID-1: / size: 4.31 GiB used: 20.8 MiB (0.5%) fs: overlay dev: ERR-102 
           ID-2: swap-1 size: 2.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb3 
Sensors:   Message: No sensors data was found. Is sensors configured? 
Info:      Processes: 179 Uptime: 4m Memory: 6.81 GiB used: 450.7 MiB (6.5%) Init: SysVinit 
           runlevel: 5 Compilers: gcc: 6.3.0 Shell: bash v: 4.4.12 inxi: 3.0.25 
demo@mx1:~/Desktop
inxi system info in UEFI mode

Code: Select all

demo@mx1:~/Desktop
$ inxi -Fxz
System:    Host: mx1 Kernel: 4.19.0-1-amd64 x86_64 bits: 64 compiler: gcc v: 6.3.0 
           Desktop: Xfce 4.12.3 Distro: MX-18_x64 Continuum Dec 20  2018 
           base: Debian GNU/Linux 9 (stretch) 
Machine:   Type: Virtualbox System: innotek product: VirtualBox v: 1.2 serial: <filter> 
           Mobo: Oracle model: VirtualBox v: 1.2 serial: <filter> UEFI: innotek v: VirtualBox 
           date: 12/01/2006 
CPU:       Topology: Quad Core model: Intel Xeon E3-1240 V2 bits: 64 type: MCP arch: Ivy Bridge 
           rev: 9 L2 cache: 8192 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 27226 
           Speed: 3403 MHz min/max: N/A Core speeds (MHz): 1: 3403 2: 3403 3: 3403 4: 3403 
Graphics:  Device-1: InnoTek Systemberatung VirtualBox Graphics Adapter driver: vboxvideo 
           v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.19.2 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1600x900~60Hz 
           OpenGL: renderer: llvmpipe (LLVM 7.0 256 bits) v: 3.3 Mesa 18.2.6 direct render: Yes 
Audio:     Device-1: Intel 82801AA AC97 Audio driver: snd_intel8x0 v: kernel bus ID: 00:05.0 
           Sound Server: ALSA v: k4.19.0-1-amd64 
Network:   Device-1: Intel 82540EM Gigabit Ethernet driver: e1000 v: 7.3.21-k8-NAPI port: c180 
           bus ID: 00:03.0 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge driver: piix4_smbus 
           v: N/A port: c100 bus ID: 00:07.0 
Drives:    Local Storage: total: 60.64 GiB used: 20.4 MiB (0.0%) 
           ID-1: /dev/sda vendor: VirtualBox model: VBOX HARDDISK size: 28.64 GiB 
           ID-2: /dev/sdb vendor: VirtualBox model: VBOX HARDDISK size: 32.00 GiB 
Partition: ID-1: / size: 4.31 GiB used: 20.4 MiB (0.5%) fs: overlay dev: ERR-102 
           ID-2: swap-1 size: 2.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb3 
Sensors:   Message: No sensors data was found. Is sensors configured? 
Info:      Processes: 177 Uptime: 1m Memory: 6.81 GiB used: 437.7 MiB (6.3%) Init: SysVinit 
           runlevel: 5 Compilers: gcc: 6.3.0 Shell: bash v: 4.4.12 inxi: 3.0.25 
:puppy:
EDIT: The /dev/sda is a USB-Stick SanDisk Ultra ( emulated for VBOX as a harddisk to make Vbox to boot from )
shown here as visible from the host:

Code: Select all

ID-4: /dev/sdg type: USB vendor: SanDisk model: Ultra size: 28.64 GiB serial: <filter> rev: 1.00 
scheme: GPT 
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
BitJam
Developer
Posts: 2283
Joined: Sat Aug 22, 2009 11:36 pm

Re: antiX live usb maker PARTITION TABLE issue?

#5 Post by BitJam »

fehlix wrote: Mon Dec 24, 2018 6:22 pmIt works! :number1:
Excellent! Well done! :number1: :number1: :number1:

I wondered if we'd need to reinstall the legacy bootloader on the gpt-mbr. I also wondered if all 3 partitions would show up in Windows if gpt were used. If so then re-arranging the partitions may not be needed.

If there was a lot of demand for this, we could build it in but the partitioning is already a little complicated because it has to change for encrypted live-usbs. Building this in would add more complication to at least do_partition() setup_devices(). We could also just script what you did to make the change afterwards. The sgdisk program has a --transpose option (for example "--transpose:1:2"). It will also convert mbr to gpt partitioning automatically so the OP could just run gdisk or sgdisk on their existing live-usb. But in that case I'm pretty sure the legacy bootloader on the "mbr" will need to get reloaded.

Good work!
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."

-- Richard Feynman

DevilMind
Posts: 11
Joined: Mon Dec 24, 2018 3:14 pm

Re: antiX live usb maker PARTITION TABLE issue?

#6 Post by DevilMind »

can't these things be added in Live USB Maker GUI App in antiX and MX Linux?

command and terminal too complicated for me

User avatar
anticapitalista
Developer
Posts: 4160
Joined: Sat Jul 15, 2006 10:40 am

Re: antiX live usb maker PARTITION TABLE issue?

#7 Post by anticapitalista »

DevilMind wrote: Tue Dec 25, 2018 8:52 am can't these things be added in Live USB Maker GUI App in antiX and MX Linux?

command and terminal too complicated for me
If you know how to do so, here is the github source.

https://github.com/MX-Linux/mx-live-usb-maker
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
fehlix
Developer
Posts: 10309
Joined: Wed Apr 11, 2018 5:09 pm

Re: antiX live usb maker PARTITION TABLE issue?

#8 Post by fehlix »

BitJam wrote: Mon Dec 24, 2018 10:53 pm I wondered if we'd need to reinstall the legacy bootloader on the gpt-mbr.
After reordering of partition-table entries: boots fine in both legacy and uefi mode.
This proofs, legacy-mbr in MX-Live-usb partition is not touched and is acceped by BIOS to boot from.

Code: Select all

$ sudo sgdisk  -A 2:show /dev/sdg 
2:2:1 (legacy BIOS bootable)
BitJam wrote: Mon Dec 24, 2018 10:53 pm I also wondered if all 3 partitions would show up in Windows if gpt were used. If so then re-arranging the partitions may not be needed.
Tested within win7 and win10:
win7: only the new re-ordered partnum 1 (dev/sdg1 "FAT32") manually formated to fat32 does show up as drive E: ( in my example )
win7fat32_e.png
win10: only both vfat partitions ( /dev/sdg1 "FAT32" and /dev/sdg3 "MX-uefi") are identfied, and "FAT32"-partition is mounted as drive G:
win10-fat32_g-usb_f.png
But "MX-uefi" vfat partition /dev/sdg3 is not recognised as a valid partition.
win10 popups to format drive "MX-uefi"-vat partition.
w10-no-access-efi-vfat-f.png
w10-format-efi-vfat-f.png
Any attempt to hide this by using "hidden flag in gparted flags: "boot, hidden, esp" or/and in addition setting gpt-flags with gdisk:

Code: Select all

$ sudo sgdisk  -A 3:set:0 /dev/sdg 
$ sudo sgdisk  -A 3:set:62 /dev/sdg 
$ sudo sgdisk  -A 3:show /dev/sdg 
3:0:1 (system partition)
3:62:1 (hidden)
did not succeed to hide this "MX-uefi" partittion in win10.
BitJam wrote: Mon Dec 24, 2018 10:53 pm We could also just script what you did to make the change afterwards.
That's might be the easiest bit, If user leaves free space on the USB-stick, we can as a post-install script this to populate, the remaining space, if choosen to have space left,
to : 1- create win-accesible partition either FAT32, exFAT, NTFS ( we might include exVAT as an option )
2- re-shuffle/re-order (transpose) to have the new partion to become partnum 1
Here my example of re-ordering using sgdisk to transpose partition-table entries:

Code: Select all

fehlix@mx171:~/Desktop
$ lsblk -f /dev/sdg
NAME   FSTYPE LABEL       UUID                                 MOUNTPOINT
sdg                                                            
├─sdg1 ext4   MX-Live-usb 76699fe8-7975-489a-84eb-ab9216a92f58 
├─sdg2 vfat   MX-uefi     CD20-C0AC                            
└─sdg3 vfat   FAT32       D606-EC9E                            
fehlix@mx171:~/Desktop
#---------------------------------------
$ sudo sgdisk --transpose=2:3  /dev/sdg
$ sudo sgdisk --transpose=1:2  /dev/sdg 
The operation has completed successfully.
$ lsblk -f /dev/sdg
NAME   FSTYPE LABEL       UUID                                 MOUNTPOINT
sdg                                                            
├─sdg1 vfat   FAT32       D606-EC9E                            
├─sdg2 ext4   MX-Live-usb 76699fe8-7975-489a-84eb-ab9216a92f58 
└─sdg3 vfat   MX-uefi     CD20-C0AC                            
fehlix@mx171:~/Desktop
#---------------------------------------
And to see how exFAT shows up in win re-formeted to exFAT. Shows up nicely in both win7 and win10.

Code: Select all

#---------------------------------------
$ sudo mkfs.exfat -n exFAT /dev/sdg1
mkexfatfs 1.2.5
Creating... done.
Flushing... done.
File system created successfully.
#....
fehlix@mx171:~/Desktop
$ lsblk -f /dev/sdg
NAME   FSTYPE LABEL       UUID                                 MOUNTPOINT
sdg                                                            
├─sdg1 exfat  exFAT       3646-C1D6                            
├─sdg2 ext4   MX-Live-usb 76699fe8-7975-489a-84eb-ab9216a92f58 
└─sdg3 vfat   MX-uefi     CD20-C0AC                            
:puppy:
You do not have the required permissions to view the files attached to this post.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

DevilMind
Posts: 11
Joined: Mon Dec 24, 2018 3:14 pm

Re: antiX live usb maker PARTITION TABLE issue?

#9 Post by DevilMind »

BitJam wrote: Mon Dec 24, 2018 5:00 pm I have not tried this (yet) but this is what I suggest you do. Use the command line live-usb-maker to make your live-usb. Use the --gpt option to create a gpt partition table and use the --size option to limit the amount of the usb stick we use or select the size interactively when the program runs. Then add your fat32 data partition and use the gdisk program to change the partition table numbering. In the expert menu there is a "t" (for transpose) option to swap the numbers of two partitions. You could use this once or twice to get the partition order you want. If you try this, please let us know if it works!

We used to use gpt as the default partitioning but Dell made some crazy machines that required us to only boot via legacy or only boot via UEFI if we used gpt. Strange but true.
can you show me commands for all this you suggested?
can you stell me how to do with GParted or other GUI apps

User avatar
fehlix
Developer
Posts: 10309
Joined: Wed Apr 11, 2018 5:09 pm

Re: antiX live usb maker PARTITION TABLE issue?

#10 Post by fehlix »

DevilMind wrote: Tue Dec 25, 2018 2:27 pm can you show me commands for all this you suggested?
can you stell me how to do with GParted or other GUI apps
I might jump in here as I have done it already. I'll go and summarize a little how to, so it might be usefull for other as well.
I'll be back asap ... :snail: ... :turtle:
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

Post Reply

Return to “antiX”