5

Live USB sticks are great to troubleshoot problem Linux systems and Ubuntu live-USB is excellent.

But it would be nice if you could use the free space on the disk to carry extra data (like a backup of a MBR or something else)
But the layout of the stick gives issues for gparted as well as for gnome-disks.
The layout gparted shows is absurd:

  • 4 kb /dev/sdc1
  • 948.78 MB unused
  • 2.28 MB FAT16 -57.65 GB unused

So I don't eve dare to make changes here.

The layout of gnome-disks looks better (stick is 16Gb):

  • 1.0 Gb ISO9660
  • 2.4 Mb FAT
  • 15 Gb free space

Accessing the disk with gparted or trying to make a new partition with gnome-disks gives this error:

"The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes."

But the stick is fine, I used it several times for installing and livebooting.
As a matter of fact, I have tested this with other sticks of different brands and sizes, I have always the same issue.

note: I Use this ultrafast command to make a USB-disk bootable from an ISO file, this works much faster than any of the graphical tools:
(provided that the stick is /dev/sdc, check with dmesg)

dd if=ubuntu.iso of=/dev/sdc bs=512
1

2 Answers 2

3

Yes, you can add extra partitions to Ubuntu bootable USB drive, (But Windows can only see the first partition on a flash drive). You can use the FAT partition that Ubuntu is installed on, to copy data to or from, using both Windows or Linux. If you are running Ubuntu from the drive, you must go to filesystem/cdrom to access the data.

Following is how I make persistent Ubuntu drives with multiple partitions, (in this case to increase persistence beyond 4GB).

Boot Live CD or Live USB. Plug in flash drive. Start gparted.

Create 2 GB FAT32 partition, (on the left side of the bar). (size is optional, extra space can be used for file storage and transfer to Windows machines).

Create a 4 GB ext2 partition to the right of this, labeled it "casper-rw". (ext3 and ext4 also work).

Create a partition in the remaining space and label it "home-rw". (optional, creates a separate home partition).

Close gparted. Un-mount and re-mount flash drive. Start "Create a live usb startup disk", (usb-creator). Select "Discard on shutdown". Press "Make Startup Disk. When usb-creator finishes, Go to the root folder of your Live USB Enter the syslinux directory, (or for UNetbootin the root directory). Make the syslinux.cfg file writeable Replace the contents of the file syslinux.cfg with:

default persistent
label persistent
  say Booting a persistent Ubuntu session...
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

Shutdown, remove CD, reboot.

First time booting go to users and groups and create an account with yourself up as an Administrator, with password if desired.

Note: The above code will bypass the Try/Install and Language screens.

For 64 bit systems use:

default persistent
label persistent
  say Booting a persistent Ubuntu session...
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --
-1

One trick I've used to create a very flexible bootable Ubuntu USB stick that you can write to is to just do a regular Ubuntu install to a USB stick rather than a fixed drive in the system.

Just insert two USB sticks, one with the installer and a blank one, and pick the blank USB stick as the destination drive for the install.

Then you can boot from this USB stick (Ubuntu installs are hardware agnostic) and install whatever software you like, store data, etc. as if it were a normal install. I call it a "Portable Linux" and I use them all the time as a sysadmin.

1
  • Hello. How is this an answer to the question that was asked.
    – David
    Apr 4, 2022 at 6:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .