Results 1 to 5 of 5

Thread: One pendrive for all PC (Intel/AMD) computers

  1. #1
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    One pendrive for all PC (Intel/AMD) computers

    One pendrive for all PC (Intel/AMD) computers

    A compressed image file is made from an Ubuntu iso file and a Lubuntu iso file. The intention is to have one USB pendrive, which can boot the vast majority of computers

    Ubuntu 14.04.1 LTS 64-bit: works with 64-bit processors in UEFI and BIOS mode - for new and middle-aged computers.

    Lubuntu 14.04.1 LTS 32-bit: works with 32-bit processors and 64-bit processors in BIOS mode - for old and middle-aged computers. The boot option forcepae extends it to Pentium M and Celeron M processors that lack the PAE flag.

    Lubuntu is booted via the syslinux interface of Ubuntu - it seems almost seamless.

    Installation

    Install from the compressed image file

    http://phillw.net/isos/one-button-in...u32-4GB.img.xz

    with the following md5sum (and size 1.7 GB compressed).

    Code:
    b7f6dd0002e25dd2f95dda7e71635b16  dd_Ubu64Lubu32-4GB.img.xz
    to a USB pendrive (4GB or more) with mkusb in linux or Win32 Disk Imager in Windows, which is described in the following links

    https://help.ubuntu.com/community/mkusb

    https://help.ubuntu.com/community/In...IOS#in_Windows

    https://wiki.ubuntu.com/Win32DiskImager/iso2usb

    Method

    I made the 'One pendrive for all PC (Intel/AMD) computers' according to the following steps:

    1. Wipe the first megabyte of a pendrive with mkusb.

    2. Create a FAT32 partition and and an empty second partition with gparted. Mount the FAT32 partition.

    3. Flash the Ubuntu iso file with the Startup Disk Creator to the FAT32 partiiton.

    4. Edit the file syslinux/txt.cfg (in the FAT32 partition)

    Code:
    default live
    label live
    menu label ^Try Ubuntu amd64 without installing
    kernel /casper/vmlinuz.efi
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
    label live-install
    menu label ^Install Ubuntu amd64
    kernel /casper/vmlinuz.efi
    append noprompt cdrom-detect/try-usb=true file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
    label check
    menu label ^Check disc for defects
    kernel /casper/vmlinuz.efi
    append noprompt boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
    label memtest
    menu label Test ^memory
    kernel /install/mt86plus
    label hd
    menu label ^Boot from first hard disk
    localboot 0x80
    # ------------------------------------------------------------------
    label lubu-live
      menu label ^Try Lubuntu i386 without installing
      kernel /lubuntu/casper/vmlinuz
      append noprompt cdrom-detect/try-usb=true  file=/cdrom/lubuntu/preseed/lubuntu.seed boot=casper initrd=/lubuntu/casper/initrd.lz quiet splash --
    label lubu-live-install
      menu label ^Install Lubuntu i386
      kernel /lubuntu/casper/vmlinuz
      append noprompt cdrom-detect/try-usb=true  file=/cdrom/lubuntu/preseed/lubuntu.seed boot=casper only-ubiquity initrd=/lubuntu/casper/initrd.lz quiet splash
    5. Create the directory lubuntu in the FAT32 partition. Loop mount the Lubuntu iso file and copy its content to the lubuntu directory.

    Code:
    sudo mount -o loop /your-path/lubuntu-14.04.1-desktop-i386.iso /mnt/iso
    mkdir /mnt/iso
    cd /mnt/iso
    sudo cp -r * /mnt/usbstick/lubuntu
    sudo umount /mnt/iso
    6. Remove the big file lubuntu/casper/filesystem.squashfs from the FAT32 file system. The squash filesystem will be accessed from the image in the second partition instead.

    7. Flash the Lubuntu iso file to the second partition. This is risky, so be warned, double check and triple check, that you have the correct target! Otherwise you might destroy your family pictures. Don't do it if you are not sure. Use the compressed image file instead. Check with

    Code:
    sudo parted -l
    df
    Code:
    sudo dd if=/media/multimed-2/CD/ubuntu/14.04/lubuntu-14.04.1-desktop-i386.iso of=/dev/sdx2 bs=4096
    where x is the current drive letter for the pendrive (I have three internal disks, so in my case x is d: /dev/sdd2).

    8. Sync the pendrive
    Code:
    sync
    Unmount the pendrive.

    Check that it is unmounted with
    Code:
    df
    before you unplug it. Otherwise it might be corrupted.

    Enjoy

    You can run a live system from the pendrive as is it and save some files in the remaining space in the FAT32 partition, 2.0 GB. And you can use it to install Ubuntu and Lubuntu 14.04.1 LTS.

    Code:
    df -h /dev/sdx?     # in my case /dev/sdd?
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sdd1       3.0G  1.1G  2.0G  34% /media/Ubu64Lubu32
    /dev/sdd2       696M  696M     0 100% /media/Lubuntu 14.04.1 LTS i386
    If you have a bigger drive there are several options how to use the remaining drive space.

    - Live system

    When you run a live system, the FAT32 partition is read-only. You can read files that were written there before you booted. For example, when connected to Windows or another linux computer as a normal data pendrive. If you create other partitions (for example at the end of the drive), you can read and write files by the live system. You can even read the casper-rw partition (if you created it for persistence).

    - Persistence

    - You can create partitions in the unallocated space behind the second partition, for example make a casper-rw partition for persistence and set the label to casper-rw. If there is no space behind the second partition (a 4 GB pendrive), you can make a casper-rw file in the 2 GB available in the FAT32 partition and create an ext2 file system inside the file, but it is not recommended. Use a fast USB 3 pendrive for persistence. Such pendrives have almost always at least 16 GB storage space. (USB 2 pendrives are slow with persistence.)

    Add the boot option persistent

    - in the file syslinux/txt.cfg for BIOS/CSM mode,

    - in the linux line of the corresponding file boot/grub/grub.cfg for UEFI mode

    - or add persistent only in real time at the boot menu.

    But use persistence only with either of Ubuntu or Lubuntu, otherwise it will be corrupted.

    When you run a persistent live system, the FAT32 partition is read-write. You can read and write files to the free space in that partition. For example, you can write and remove files, that can be read by Windows when connected to another computer as a normal data pendrive. But beware, do not remove any system files from the FAT32 partition! Persistence is sensitive to other errors too, so backup the casper-rw partition regularly.

    - More than one persistent system can be made by adding Knoppix or Puppy Linux. See this thread.

    . A persistent Ubuntu system and a persistent Knoppix system would work in the same pendrive. In this case I would suggest standard Ubuntu desktop 64-bit and Knoppix 32-bit. Knoppix is good at recognizing old hardware and has its own system for persistence, different from and independent of Ubuntu.

    . Thinking further: In order to extend the pendrive to even older computers, Wary Puppy or TahrPup would be a good alternative. They have their own file for persistence, different from those of Ubuntu and Knoppix.

    - Expand the FAT32 partition 'grow it'

    It is also possible to move the second partition to the end of the drive and grow the first partition according to GrowIt.pdf.

    Read more ...

    https://help.ubuntu.com/community/In...n/FromUSBStick
    Attached Images Attached Images
    Last edited by sudodus; January 31st, 2015 at 05:47 PM. Reason: See the following posts

  2. #2
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: One pendrive for all PC (Intel/AMD) computers

    I found that I could remove the the squash filesystem from the FAT32 partition and save 644MiB drive space, 2.0 GB is free in the FAT32 partition after this tweak, and the compressed iso file is also smaller than before.

    6. Remove the big file lubuntu/casper/filesystem.squashfs from the FAT32 file system. The squash filesystem will be accessed from the image in the second partition instead.

  3. #3
    Join Date
    Sep 2010
    Location
    Beta Testing in Canada
    Beans
    6,618
    Distro
    Ubuntu Development Release

    Re: One pendrive for all PC (Intel/AMD) computers

    I am looking at this later ...

    regards..
    This is Rolling Release
    Warnings for New Beta Testers& Helpful Terminal Commands:
    Running W. Werewolf /dev/@ 4.05GHz64bit/ onE8400 Core2Duo-Wolfdale+Howler

  4. #4
    Join Date
    Jun 2007
    Location
    Lynn Valley, BC
    Beans
    2,619
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: One pendrive for all PC (Intel/AMD) computers

    Looks like another good one Sudodos.
    Have you tried putting Lubuntu in it's own partiton with it's own Casper-rw file.
    (have been wondering if this would work but have not had a chance to try).
    It might also be nice to get rid of the try/install from the menu and just give a choice between Ubuntu and Lubuntu.
    Just a thought.

  5. #5
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: One pendrive for all PC (Intel/AMD) computers

    Quote Originally Posted by C.S.Cameron View Post
    Looks like another good one Sudodos.
    Have you tried putting Lubuntu in it's own partiton with it's own Casper-rw file.
    (have been wondering if this would work but have not had a chance to try).
    I'm not sure I understand. I did not not think it would be possible to assign which casper-rw file or partition to select, where and in which order the system looks for casper-rw devices. Maybe it is possible. I would be happy if you can try that out
    It might also be nice to get rid of the try/install from the menu and just give a choice between Ubuntu and Lubuntu.
    Just a thought.
    Yes, you are right, but there is a reason why I did it this way. I did not want to touch [the part of] the system, that selects between UEFI and BIOS, so I appended Lubuntu in a place, where that selection has already been done.

    Maybe it would work to make a subdirectory in the FAT32 partition for ubuntu too (alongside the lubuntu directory), put the Ubuntu stuff there except the squashfs filesystem, and strip the top level menu to a simple selection between Ubuntu-64-bit and Lubuntu-32-bit.

    -o-

    Edit: The discussion about more than one persistent system in the same pendrive continues in the following thread by C.S.Cameron

    Multiboot flash drive with second partition
    Last edited by sudodus; January 23rd, 2015 at 07:54 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •