1

I'm trying to make a live USB boot drive for Ubuntu 18.04. I don't want to use Windows, as I don't like (or trust) Windows.

Here's the catch: I've found FAT32 to be completely unreliable. Seriously, if I had a dollar for every instance I've had a FAT32 filesystem so screwed up I had no choice but tpageo completely wipe it... *sigh*.

Since EXTLinux (a varient of SysLinux) supposedly supports NTFS (see here), I've decided to try that. I figured that since NTFS support in GNU/Linux systems hasn't really given me any real problems before, I'd try that.

After manually copying all the files from the ISO, I tried typing sudo extlinux --install --device /dev/sdb3 --stupid /media/Ubuntu-live/, only to get an error when I attempted to test the flash drive: Boot error. What am I doing wrong?

PS: This flash drive has three partitions. I Want to make the third one bootable. Partition 3 currently has the "boot" (active) flag enabled in GParted.

Update: I forgot to mention that I want a persistent option in the boot menu. I know how to add an option myself, but doing so means I need a file system that can be mounted as read-write.

TSJNachos117
  • 1,444
  • 2
  • 15
  • 19
  • You have to use FAT or in theory ext2 – Panther Jul 31 '18 at 04:23
  • @Panther: Supposedly, EXTLinux supports NTFS. I just realized I forgot to put a link pointing to where I read that. Please re-read my OP, or see here. – TSJNachos117 Jul 31 '18 at 04:28
  • 1
    Rufus developer here. If you are adventurous, Rufus allows you to create NTFS-based Live USB from Linux images (once you change the file system from FAT32 to NTFS after selecting the ISO). Last time I tried, recent Debian and Ubuntu seemed to work okay with NTFS when booted on a BIOS system (or in in CSM emulation/BIOS-compatibility mode from UEFI). At least, this was the case for ubuntu-18.04-desktop-amd64.iso. However latest Ubuntu failed to boot in pure UEFI mode however (GRUB prompt) because the Ubuntu maintainers forgot to add the NTFS file system module to their GRUB bootloader... – Akeo Jul 31 '18 at 09:21
  • @Akeo: I think the op is looking for persistence, is persistence working in Rufus? – C.S.Cameron Jul 31 '18 at 18:29
  • 1
    @C.S.Cameron, I think it's pretty clear that what OP wants (even if he or she also wants persistence) is to use a file system that isn't FAT32 for the partition where the live system files are to reside. Why else would they talk about Syslinux supporting NTFS, since Syslinux is only relevant for booting the system partition. – Akeo Aug 01 '18 at 19:46
  • 1
    @C.S.Cameron: I actually want both NTFS and persistence, if possible. If rufus uses GRUB, I should be able to change the grub.cfg file to add persistence, right? (Assuming Rufus doesn't do so automatically.) – TSJNachos117 Aug 02 '18 at 00:50
  • It is easy to add persistence to Rufus FAT32 using a casper-rw file and adding "persistence" to txt.cfg, the same method with Rufus NTFS does not give persistence. – C.S.Cameron Aug 02 '18 at 03:09
  • 1
    For the record, MultiBootUSB will also run on NTFS, but not persistent, for that you need YUMI. I think YUMI uses grub4dos to create a virtual persistent partition that can be over 4GB and reside on NTFS. It just don't work on UEFI. – C.S.Cameron Aug 02 '18 at 04:11

2 Answers2

2

Cloning - live-only system

It is possible to use other file systems, for example NTFS for a live USB drive with Ubuntu, but you need not develop and test such systems. Instead you can simply clone from the iso file to the USB drive.

Cloning is a very reliable process and likely to succeed. The current Ubuntu iso files as well as most [but not all] major linux iso files are hybrid iso files. It means that they can be burned to DVD disks and cloned to mass storage devices (USB pendrives, HDDs, SSDs, memory cards ...) and the target devices will be bootable with a live system. The iso 9660 file system will be 'inherited' from the iso file.

You can clone from the iso file to a USB stick and use that USB stick to boot Ubuntu live and install Ubuntu into the internal drive.

dd is a cloning tool, but it is risky because it does what you tell it to do without any question. If you tell it to wipe the family pictures it will do it. A minor typing error may create chaos. You must be very careful, check and double-check that everything is correct before you press the Enter key.

Instead I recommend a tool with a final checkpoint,

  • in Ubuntu 16.04 LTS and newer versions: Startup Disk Creator alias usb-creator-gtk

  • in Ubuntu 14.04 LTS and newer versions: Disks alias gnome-disks

  • in Ubuntu 12.04 LTS and newer versions and other main Ubuntu distros: mkusb

  • in Windows: Win32 Disk Imager

  • in Windows: Rufus - an extracting tool and a cloning tool

  • in MacOS: Unetbootin - an extracting tool (not a cloning tool)

Persistent live system

I think you can make a system boot via syslinux/extlinux in BIOS mode using NTFS, but it will be harder to make it boot in UEFI mode without an EFI system partition with the FAT file system. So if you want portability to computers that boot in UEFI mode, you need FAT (or at least things will be much easier that way). You can to make a persistent live system with mkusb and check if that will work well enough for you.

Installed system in a USB drive

An alternative is to create an installed system on the USB drive, installed like into an internal drive, but into a USB drive (pendrive, SSD, HDD ...). See this link, Boot Ubuntu from external drive. Such a system will boot via grub, and there will normally be an ext4 root file system. And it can be portable between computers.

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • 1
    I forgot to mention, I want the system to be persistent. Is that possible with the ISO9660 file system, or is said file system read-only? – TSJNachos117 Jul 31 '18 at 04:46
  • Cloned USB drives will be read-only, so live-only, not persistent live. I think you can make a system boot via syslinux/extlinux in BIOS mode using NTFS, but it will be harder to make it boot in UEFI mode without an EFI system partition with the FAT file system. So if you want portability to computers that boot in UEFI mode, you need FAT (or at least things will be much easier that way). You can to make a persistent live system with mkusb and check if that will work well enough for you. – sudodus Jul 31 '18 at 04:55
  • 1
    TBH, I don't care about UEFI. I greatly prefer the simplicity of legacy booting, where I can pretty much boot whatever I want without worrying about any UEFI stuff (especially "secure" boot). – TSJNachos117 Jul 31 '18 at 04:58
  • Well, in that case both NTFS and ext2 will work. I have tested ext2 (and it worked), but not NTFS, but I have read reports about such working systems. -- An alternative is to create an installed system on the USB drive, installed like into an internal drive, but into a USB drive (pendrive, SSD, HDD ...). See this link, Boot Ubuntu from external drive. Such a system will boot via grub, and there will normally be an ext4 root file system. And it can be portable between computers. – sudodus Jul 31 '18 at 05:03
  • If I go down that route, could I use something designed specifically for flash, like F2FS? How well does F2FS work with GRUB? (I've had bad experiences attempting to combine GRUB with BTRFS, so I'm guessing GRUB only really supports a handful of file systems.) – TSJNachos117 Jul 31 '18 at 05:29
  • I don't know F2FS. I know that ext2, ext3 and ext4 work well with grub. – sudodus Jul 31 '18 at 05:49
  • 1
    The currently supported filesystem types are Amiga Fast FileSystem (AFFS), AtheOS fs, BeFS, BtrFS (including raid0, raid1, raid10, gzip and lzo), cpio (little- and big-endian bin, odc and newc variants), Linux ext2/ext3/ext4, DOS FAT12/FAT16/FAT32, exFAT, HFS, HFS+, ISO9660 (including Joliet, Rock-ridge and multi-chunk files), JFS, Minix fs (versions 1, 2 and 3), nilfs2, NTFS (including compression), ReiserFS, ROMFS, Amiga Smart FileSystem (SFS), Squash4, tar, UDF, BSD UFS/UFS2, XFS, and ZFS (including lzjb, gzip, zle, mirror, stripe, raidz1/2/3 and encryption in AES-CCM and AES-GCM), no F2FS? – C.S.Cameron Jul 31 '18 at 22:05
  • @C.S.Cameron: That's quite a list of filesystems. If F2FS doesn't work, I'm sure one of those other filesystems will suit my needs just fine. – TSJNachos117 Aug 02 '18 at 00:54
  • @TSJNachos117: Someone talked me into using ReiserFS for a while, that's about as wild as I get. – C.S.Cameron Aug 02 '18 at 03:23
1

YUMI will make a pure NTFS flash drive with the possibility of multiple operating systems and multiple persistence, (no 4GB limit). It also works with a single OS if preferred.

YUMI uses extlinux to boot and grub4dos for large persistence.

There is a Beta YUMI for UEFI if required, it only works with FAT32

mkusb only uses a tiny bit of FAT for booting, thus works on BIOS and UEFI.

I have found Persistent flash drives go corrupt faster than Full install flash drives. NTFS has a habit of fragmenting, as most Windows users know.

A Full install flash drive can be made with a single ext partition, however I prefer a Full install flash drive based on a mkusb base, see Install full Ubuntu and bootloader on USB drive

This method also used a tiny bit of FAT as needed to boot UEFI.

C.S.Cameron
  • 19,519
  • Side note: fragmentation is irrelevant on storage devices that lack moving parts. This includes flash drives. Also, I think NTFS is more resilient to fragmentation than FAT32, but I could be wrong. (And if I am, who cares? It's a flash drive.) – TSJNachos117 Aug 02 '18 at 00:57
  • 1
    I have had flash drives fail due to fragmentation, at least that is what the error messages said. The drive is physically OK and has been running a full install for the last 2 years. – C.S.Cameron Aug 02 '18 at 03:19