Page 1 of 17 12311 ... LastLast
Results 1 to 10 of 167

Thread: One pendrive for all PC (Intel/AMD) computers - single-boot dual-boot multi-boot

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

    One pendrive for all PC (Intel/AMD) computers - single-boot dual-boot multi-boot

    Post #1. One pendrive for all PC (Intel/AMD) computers - Ubuntu 64-bit and Lubuntu 32-bit

    Ubuntu 64-bit works in BIOS and UEFI mode, also with secure boot. Lubuntu 32-bit works with 32-bit and 64-bit computer hardware, so it adds ability to boot 32-bit computers including old hardware.


    The following posts (6, 7, 8, 10, 11, 48, 49) describe 'grub-n-iso' systems, that can boot 32-bit and 64-bit Ubuntu family operating systems in BIOS and UEFI mode, but these 'grub-n-iso' systems do not work with secure boot.

    Post #6. A smaller and simpler pendrive for all PC (Intel/AMD) computers - 'grub-n-iso' - Lubuntu 32-bit

    Post #7. Multiboot pendrive system for all PC (Intel/AMD) computers

    Post #8. Build your own single boot or multiboot pendrive for all PC (Intel/AMD) computers

    Post #10. Create or download a portable system with a small footprint with a potential for isotesting

    Post #11. Manage the daily built iso files of your choice

    Post #12. Comments and tips

    Post #48. Test results with mk-grub-n-iso-s which is built into mkusb version 10

    Post #49. A compressed image file with a persistent live system of Lubuntu 14.04.3 LTS (32-bit) and mkusb version 10.4

    Post #144. Make persistent live drives with casper-rw and home-rw partitions New 2018-04-30

    The system with compressed image files makes it easy for a beginner to install, but it is rather inflexible. So I made shell-scripts, that does the main part of the work with the help of a couple of files for the configuration of the booting system.


    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. It works also with secure boot (in UEFI).

    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

    phillw.net/isos/linux-tools/uefi-n-bios/dd_Ubu64Lubu32-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 mibibyte of a pendrive with mkusb.

    mkusb is a tool with a graphical user interface. You navigate via menus. Maybe the quick start manual can help you get started and find the relevant menu, where you can wipe the first MiB (mibibyte, base 2).

    mkUSB-quick-start-manual-12.pdf

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

    gparted is also a tool with a graphical user interface. You navigate via menus. Maybe the following link will help you use it,

    GParted partitioning software - Full tutorial

    3. Flash (extract the content of) the Ubuntu iso file with the Startup Disk Creator to the FAT32 partiiton.

    The Ubuntu Startup Disk Creator has been changed in a fundamental way since I wrote these instructions. You can still use the version that comes with Ubuntu 14.04.x LTS for this purpose. But the version of the Startup Disk Creator in Ubuntu 16.04 LTS (16.04.x) and newer versions is a cloning tool, and does not do what is intended in step 3. (You can also use another tool for this purpose, a tool to extract the content. It would be possible with for example the command line tool rsync. In that case you would install the bootloader separately.)

    You find the old version Ubuntu 14.04.1 LTS via this link,

    http://old-releases.ubuntu.com/releases/

    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; April 30th, 2018 at 03:29 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
    Beans
    9,205
    Distro
    Ubuntu Budgie 17.10 Artful Aardvark

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

    I am looking at this later ...

    regards..

  4. #4
    Join Date
    Jun 2007
    Location
    Southern Sri Lanka
    Beans
    3,051
    Distro
    Ubuntu 18.04 Bionic Beaver

    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.

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

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

    The following posts (6, 7, 8, 10, 11) describe 'grub-n-iso' systems, that can boot 32-bit and 64-bit Ubuntu family operating systems in BIOS and UEFI mode, but these 'grub-n-iso' systems do not work with secure boot. The system described in post #1 works with secure boot.

    A smaller and simpler pendrive for all PC (Intel/AMD) computers - 'grub-n-iso'

    A compressed image file is made from a system that boots via grub and a Lubuntu iso file. The intention is to have one USB pendrive, which can boot the vast majority of computers. This is a smaller and simpler alternative than what is described in post #1.

    The grub system works in UEFI and BIOS mode. It is developed from a multiboot system for UEFI by Andre Rodovalho. See the following link,

    How to Create a EFI/UEFI GRUB2 Multiboot USB drive to boot ISO images


    Lubuntu 14.04.2 LTS 32-bit: works with 32-bit processors and 64-bit processors in old, middle-aged and new computers. The boot option forcepae should be used when installing Lubuntu into computers with Pentium M and Celeron M processors that lack the PAE flag.

    Lubuntu is booted via grub and the standard Lubuntu ISO file, but in a new way, that allows it to work in both UEFI and BIOS mode. A partition with the label casper-rw provides persistence.

    Installation

    Install from the compressed image file

    dd_lubuntu-14.04.2-desktop-i386_4GB.img.xz

    with the following md5sum (and size 699 Mibibytes compressed).

    Code:
    b3844fc5a0b2adea0b943a193538e4ea  dd_lubuntu-14.04.2-desktop-i386_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

    Linux

    It is straight-forward with mkusb in linux according to https://help.ubuntu.com/community/mkusb

    Windows

    In Windows you should expand the compressed image file with for example 7-zip before using Win32 Disk Imager.

    Download the following help programs
    http://www.md5summer.org
    http://www.7-zip.org
    http://sourceforge.net/projects/win32diskimager

    First check that the download was successful with md5summer.

    Next extract the image file with 7-zip (It is also possible with winzip)

    from dd_lubuntu-14.04.2-desktop-i386_4GB.img.xz to dd_lubuntu-14.04.2-desktop-i386_4GB.img

    And then use Win32 Disk Imager according to https://wiki.ubuntu.com/Win32DiskImager/iso2usb

    Method

    I made this smaller and simpler pendrive for all PC (Intel/AMD) computers - 'grub-n-iso' - according to this link

    Enjoy

    - 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 (made for persistence).

    - Persistence

    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.

    There might be problems if you use the casper-rw partition for different iso files and install program packages. Data files can be shared without problems. If the persistence is damaged, you can always remove all files, or simply format it (make a new ext2 file system).

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

    - Expand the FAT32 partition 'grow it'

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

    Use the unallocated space, if there is space behind the second partition (in a bigger than 4 GB pendrive). You can move the casper-rw partition in order to increase the size of the FAT32 partition to make room for another iso file or increase the size of the casper-rw partition or create a completely new partition. 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.)

    See also ...

    http://phillw.net/isos/linux-tools/uefi-n-bios/

    https://help.ubuntu.com/community/In...n/FromUSBStick
    Attached Images Attached Images
    Last edited by sudodus; July 25th, 2015 at 10:08 PM. Reason: updated image file (with a boot flag); comment on secure boot

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

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

    Multiboot pendrive system for all PC (Intel/AMD) computers

    The previous post described how to install a 'grub-n-iso' system to a pendrive from a compressed image file. It is a system with a single Lubuntu iso file. There is also a compressed image file with a multiboot system for an 8 GB or larger pendrive

    - that boots via grub in BIOS as well as in UEFI mode

    - contains the following iso files

    kubuntu-14.04.2-desktop-amd64.iso
    lubuntu-14.04.2-desktop-i386.iso
    ubuntu-12.04-desktop-i386.iso
    ubuntu-14.04.2-desktop-amd64.iso
    ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    xubuntu-14.04.1-desktop-i386.iso

    - contains a casper-rw partition for persistence.

    Download and install

    Download from the following link

    dd_ubuntu-flavours-multiboot-G_7.8GB.img.xz

    Check with the following md5sum (and size 5.3 Gibibytes compressed).

    Code:
    0c18cff407e339a620a5787ebd7af64a  dd_ubuntu-flavours-multiboot-G_7.8GB.img.xz
    Linux

    Installing is straight-forward with mkusb in linux, https://help.ubuntu.com/community/mkusb

    Windows

    In Windows you should expand the compressed image file with for example 7-zip before using Win32 Disk Imager, which is described with more details in the previous post.

    Usage

    Notice that 32-bit as well as 64-bit iso files can be booted in UEFI mode, so booting from a 32-bit iso file works in most PCs with Intel and AMD processors, from very old 32-bit PCs to new PCs running in UEFI mode.

    You can edit the partitions with gparted, for example change the sizes, in order to use the whole pendrive, if it is bigger than what is expanded from the compressed image files (4 GB or 8 GB). The casper-rw partition can be moved without creating problems. The fat32 partitions size can be changed, but its head end should stay where it is.

    There might be problems if you use the casper-rw partition for different iso files and install program packages. Data files can be shared without problems. If the persistence is damaged, you can always remove all files, or simply format it (make a new ext2 file system).



    The system with compressed image files makes it easy for a beginner to install, but it is rather inflexible.
    Attached Images Attached Images
    Last edited by sudodus; July 25th, 2015 at 10:09 PM. Reason: updated image file (with a boot flag)

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

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

    Build your own single boot or multiboot pendrive for all PC (Intel/AMD) computers

    The system with compressed image files makes it easy for a beginner to install, but it is rather inflexible. So I made a shell-script, that does the main part of the work with the help of a couple of files for the configuration of the booting system.

    The shell-script is made to be easy to use, but it helps if you have some experience with terminal windows and command lines. If you want to understand what the shell-script is doing under the hood, just read it in a text viewer or editor. Ask here (reply to the thread), if you have questions, and report a bug, if you find one

    A. This tarball

    grub-n-iso_multiboot.tar.gz

    contains the directory 'grub-n-iso_multiboot' and several files.

    Code:
    2015-06-11 09:17 about
    2015-06-26 00:02 grub.cfg
    2015-06-26 16:45 links2check
    2015-06-11 15:00 make-alias
    2015-06-26 16:36 mk-grub-n-iso
    2015-06-23 11:17 mkusb-nox
    2015-05-22 10:36 usb-pack_efi.zip
    1. 'about' is a batch file, that writes 'About' information

    Code:
    $ bash about
    #!/bin/bash
    
    #       Copyright 2015 Nio Wiklund alias sudodus
    #
    #       GPLv3: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>.
    #
    #       This  is  free  software: you are free to change and redistribute it.
    #       There is NO WARRANTY, to the extent permitted by law.
    #
    #       This scipt is developed from the method developed by
    #       Andre Rodovalho alias sysmatck in the Ubuntu Forums
    #       http://ubuntuforums.org/showthread.php?t=2276498
    #       and uses the file 'usb-pack_efi.zip' developed by him.
    #
    2. 'grub.cfg' is a template for Ubuntu family iso files

    Code:
    set timeout=10
    set default=0
    
    menuentry "ubuntu.iso - live" {
     loopback loop /ubuntu.iso
     linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso splash --
     initrd (loop)/casper/initrd.lz
    }
    menuentry "ubuntu.iso - persistent live" {
     loopback loop /ubuntu.iso
     linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso splash persistent -- persistent
     initrd (loop)/casper/initrd.lz
    }
    This very simple grub.cfg file was developed from the file provided by Pendrivelinux at

    http://pendrivelinux.com/downloads/m...linux/grub.cfg

    3. 'links2check' is a batch file, that is used for managing the iso files.

    'links2check' help managing the daily iso files, to install those you want and keep them up to date. There are two zenity graphical menus to make it more user friendly to select the iso files. The output, however, is still in text mode, written into the terminal window.

    When installed and running from the 'grub-n-iso' pendrive, change directory to '/isodevice' and run 'links2check'

    Code:
    $ sudo -H ./links2check

    4. 'make-alias' is a batch file, that creates the alias 'mkgni'

    that changes directory to 'grub-n-iso_multiboot' and prints a help text

    Code:
    $ mkgni
    5. 'mk-grub-n-iso' is the main subject in this post, a batch file, that builds a [multi]boot drive.

    6. 'mkusb-nox' is a batch file for installing iso files into other pendrives.

    mkusb-nox is is used for installing 'debian' installer iso files, that work in text mode and do not boot via the 'grub-n-iso' method.

    Example:

    Code:
    $ sudo mkusb-nox ubuntu.iso
    7. 'usb-pack_efi.zip' contains configuration files for UEFI mode

    It is made and uploaded by Andre Rodovalho alias sysmatck


    B. Download the tarball from

    http://phillw.net/isos/linux-tools/u...ltiboot.tar.gz

    and check the md5sum with the file

    http://phillw.net/isos/linux-tools/u...-n-iso.md5.asc


    C. Install grub-n-iso_multiboot

    The tarball is probably in your directory 'Downloads'. If that is where you want to install your directory 'grub-n-iso_multiboot', fine, otherwise I suggest that you move the tarball to where you want it, maybe directly in your home directory, and change directory to there.

    1. Expand the tarball

    Code:
    tar -cvzf grub-n-iso_multiboot.tar.gz grub-n-iso_multiboot
    2. Change directory to 'grub-n-iso_multiboot' and create an alias

    Code:
    cd grub-n-iso_multiboot
    make-alias
    3. Open a new terminal window and run

    Code:
    $ mkgni
    Usage:   sudo /home/sudodus/bin/mk-grub-n-iso <source.iso> <target device> [isotest]
    Example: sudo /home/sudodus/bin/mk-grub-n-iso ubuntu.iso /dev/sdx
    Example: sudo /home/sudodus/bin/mk-grub-n-iso multiboot /dev/sdx
    Example: sudo /home/sudodus/bin/mk-grub-n-iso lubuntu.iso /dev/sdx isotest
    
    Try again with the correct target device according to the list below
    
    MODEL            NAME   FSTYPE LABEL MOUNTPOINT                   SIZE
    SAMSUNG HD322HJ  sda                                            298.1G
                     |-sda1                                            80G
                     |-sda2                                            64G
                     |-sda4                                             1K
                     |-sda5              [SWAP]                         8G
                     |-sda6              /                             32G
                     |-sda7                                            14G
                     `-sda8                                         100.1G
    OCZ-AGILITY3     sdb                                             55.9G
                     |-sdb1                                           3.7G
                     |-sdb2                                           320M
                     |-sdb4                                             1K
                     `-sdb5                                          51.9G
    WDC WD1003FBYZ-0 sdc                                            931.5G
                     |-sdc1                                            50G
                     |-sdc2                                             1K
                     |-sdc5                                            20G
                     |-sdc6                                             8G
                     `-sdc7              /mnt/multimed-2            853.5G
    Extreme          sdd                                             14.6G
                     |-sdd1              /media/sudodus/lub14042-32    64M
                     |-sdd2              /media/sudodus/isodevice       5G
                     `-sdd3              /media/sudodus/casper-rw     2.2G
    DVD+-RW GSA-H21L sr0                                             1024M
    'mkgni' is changing directory to 'grub-n-iso_multiboot' and running 'mk-grub-n-iso' without parameters, so that it writes help output. We see
    that it should be run with superuser privileges, and that there should be two parameters, the <source file> and the <target device>. See the first example in the usage output

    Code:
    sudo ./mk-grub-n-iso ubuntu.iso /dev/sdx
    It is also possible to use the following four tokens, -h, -v, multiboot, and isotest.

    -h makes it write the same help output as without parameters.

    -v makes it write version information

    Code:
    $ ./mk-grub-n-iso -v
    mk-grub-n-iso 1.1
    'multiboot' makes 'mk-grub-n-iso' look for all iso files in the current directory (grub-n-iso_multiboot), *.iso, and use them as source files.
    See the second demo example and the output from the command

    Code:
    sudo ./mk-grub-n-iso multiboot /dev/sdx
    'isotest' makes 'mk-grub-n-iso' prepare for managing daily iso files in the current directory, and make them bootable by adding menuentries to the target 'grub.cfg' file.
    See the fourth demo example and the output from the command

    Code:
    sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd isotest
    The target device letter x should be selected according to the tree view of the devices. In this case the system is booted from '/dev/sda', so
    '/dev/sdb' should be selected as the target device.

    WARNING!

    Check carefully that you specify the correct target device, otherwise you might destroy valuable data!


    Wait a while! There is no iso file in the directory 'grub-n-iso_multiboot'


    D. Get iso files

    1. Download one or more iso files with Ubuntu family desktop operating systems.

    You can find download information via this link

    http://releases.ubuntu.com/

    and check the md5sum.

    Not now, but when the system is installed, you can also download, update incrementally with rsync and check the md5sum with

    Code:
    $ sudo -H ./links2check
    2. If you download an iso file with another distro,

    you need to configure the menuentry in grub.cfg manually. The following links may help

    https://wiki.archlinux.org/index.php...boot_USB_drive

    https://help.ubuntu.com/community/Grub2/ISOBoot

    https://help.ubuntu.com/community/Gr...OBoot/Examples

    https://help.ubuntu.com/community/Grub2/CustomMenus

    3. Make the iso files available

    Single iso files can be entered with the full path (in the command line).

    But if you want to create a multiboot pendrive, the source files (or links to the source files) must be in the directory 'grub-n-iso_multiboot'. It is also convenient the create links, even when you intend to install single iso files.

    Create links from the location of the downloaded iso files to 'grub-n-iso_multiboot' (or move the files if you like). You can use symbolic
    links as well as hard links. Avoid copying because it is a waste of disk space.

    Examples

    Code:
    $ ls -1 ~/Downloads/iso
    kubuntu-14.04.2-desktop-amd64.iso
    lubuntu-14.04.2-desktop-i386.iso
    ubuntu-12.04-desktop-i386.iso
    ubuntu-14.04.2-desktop-amd64.iso
    ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    xubuntu-14.04.1-desktop-i386.iso
    
    $ mkgni
    Example 1 - link all files (the final dots in the command lines are important)
    Code:
    ln -s ~/Downloads/iso/*.iso .
    Example 2 - link only standard ubuntu files
    Code:
    ln -s ~/Downloads/iso/ubuntu-1*.iso .
    Example 3 - link only 32-bit files
    Code:
    ln -s ~/Downloads/iso/*i386*.iso .
    Example 4 - link only 64-bit files
    Code:
    ln -s ~/Downloads/iso/*amd64*.iso .

    E. Demo runs

    1. Create a portable system with a small foot-print

    Code:
    sudo ./mk-grub-n-iso ~/Downloads/iso/lubuntu-14.04.2-desktop-i386.iso /dev/sdx
    Code:
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd
    'lubuntu-14.04.2-desktop-i386.iso' is identified as the source ISO file
    
    MODEL            NAME   FSTYPE LABEL       MOUNTPOINT   SIZE
    Extreme          sdd                                   29.8G
                     |-sdd1 vfat   lub14042-32              787M
                     `-sdd2 ext2   casper-rw                  3G
    
    Go ahead and overwrite /dev/sdd ? (g/q) g
    Using 'grub.cfg' in the current directory
    Using 'usb-pack_efi' in the current directory
    ---------------------------------------------------------------------------
    Create new system or Add new iso file? (c/a)? c
     FINAL WARNING:  Are you sure /dev/sdd ? (y/n) y
    1024+0 records in
    1024+0 records out
    1048576 bytes (1.0 MB) copied, 0.16422 s, 6.4 MB/s
    ---------------------------------------------------------------------------
         Use gparted and create an msdos partition table
    ---------------------------------------------------------------------------
    Suggested values, may be changed according to the size of 'lubuntu-14.04.2-desktop-i386.iso'
    /dev/sdd1:  file system= fat32   size= 787  Mibibytes to host grub and iso files
    /dev/sdd2:  file system= ext2    size=rest of device
    ======================
    libparted : 2.3
    ======================
    fatlabel: warning - lowercase labels might not work properly with DOS or Windows
    tune2fs 1.42.9 (4-Feb-2014)
    ---------------------------------------------------------------------------
    source=lubuntu-14.04.2-desktop-i386.iso
    ---------------------------------------------------------------------------
    UEFI Bootloader:  Installing for i386-pc platform.
    Installation finished. No error reported.
    BIOS Bootloader (maybe complaints)  : Installing for i386-pc platform.
    Installation finished. No error reported.
    Copying files ...
    sending incremental file list
    ./
    EFI/
    EFI/BOOT/
    EFI/BOOT/bootia32.efi
    EFI/BOOT/bootx64.efi
    boot/
    boot/grub/
    boot/grub/menu.lst
    boot/grub4dos/
    boot/grub4dos/g2ldr
    boot/grub4dos/grub.exe
    boot/memtest/
    boot/memtest/memtest.bin
    boot/memtest/memtest86+-5.01.bin
    
    sent 2,311,447 bytes  received 188 bytes  4,623,270.00 bytes/sec
    total size is 2,310,239  speedup is 1.00
    mount: block device /mnt/multimed-2/test/lubuntu/trusty-desktop-i386.iso is write-protected, mounting read-only
    < lubuntu-14.04.2-desktop-i386.iso pv > /mnt/target/lubuntu-14.04.2-desktop-i386.iso
     703MB 0:00:26 [26.2MB/s] [===============================================>] 100%            
    Syncing the target device ...
    MODEL            NAME   FSTYPE LABEL       MOUNTPOINT   SIZE
    Extreme          sdd                                   29.8G
                     |-sdd1 vfat   lub14042-32              787M
                     `-sdd2 ext2   casper-rw                  3G
    The target device is ready to use.
    'lubuntu-14.04.2-desktop-i386.iso' was installed
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$
    2. Create a multiboot system with only standard ubuntu files

    You can create extra space in the fat32 partition and add more iso files later.

    Code:
    mkgni
    rm *.iso
    ln -s ~/Downloads/iso/ubuntu-1*.iso .
    sudo ./mk-grub-n-iso multiboot /dev/sdx
    
    Code:
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso multiboot /dev/sdd 
    [sudo] password for sudodus: 
    multi-boot: all iso files in the current directory will be used
    kubuntu-14.04.2-desktop-amd64.iso
    lubuntu-14.04.2-desktop-i386.iso
    ubuntu-12.04-desktop-i386.iso
    ubuntu-14.04.2-desktop-amd64.iso
    ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    xubuntu-14.04.1-desktop-i386.iso
     WARNING:  the target device will be wiped and re-partitioned
    
    MODEL            NAME   FSTYPE LABEL       MOUNTPOINT                   SIZE
    Extreme          sdd                                                   29.8G
                     |-sdd1 vfat   lub14042-32 /media/sudodus/lub14042-32   787M
                     `-sdd2 ext2   casper-rw   /media/sudodus/casper-rw       3G
    
    Go ahead and overwrite /dev/sdd ? (g/q) g
    Using 'grub.cfg' in the current directory
    Using 'usb-pack_efi' in the current directory
     FINAL WARNING:  Are you sure /dev/sdd ? (y/n) y
    1024+0 records in
    1024+0 records out
    1048576 bytes (1.0 MB) copied, 0.162574 s, 6.4 MB/s
    ---------------------------------------------------------------------------
         Use gparted and create an msdos partition table
    ---------------------------------------------------------------------------
    Suggested values, may be changed according to the size of 'multiboot'
    /dev/sdd1:  file system= fat32   size= 5749  Mibibytes to host grub and iso files
    /dev/sdd2:  file system= ext2    size=rest of device
    ======================
    libparted : 2.3
    ======================
    fatlabel: warning - lowercase labels might not work properly with DOS or Windows
    tune2fs 1.42.9 (4-Feb-2014)
    ---------------------------------------------------------------------------
    source=*.iso
    ---------------------------------------------------------------------------
    UEFI Bootloader:  Installing for i386-pc platform.
    Installation finished. No error reported.
    BIOS Bootloader (maybe complaints)  : Installing for i386-pc platform.
    Installation finished. No error reported.
    Copying files ...
    sending incremental file list
    ./
    EFI/
    EFI/BOOT/
    EFI/BOOT/bootia32.efi
    EFI/BOOT/bootx64.efi
    boot/
    boot/grub/
    boot/grub/menu.lst
    boot/grub4dos/
    boot/grub4dos/g2ldr
    boot/grub4dos/grub.exe
    boot/memtest/
    boot/memtest/memtest.bin
    boot/memtest/memtest86+-5.01.bin
    
    sent 2,311,443 bytes  received 188 bytes  4,623,262.00 bytes/sec
    total size is 2,310,239  speedup is 1.00
    mount: block device /mnt/multimed-2/CD/ubuntu/14.04/kubuntu-14.04.2-desktop-amd64.iso is write-protected, mounting read-only
    < kubuntu-14.04.2-desktop-amd64.iso pv > /mnt/target/kubuntu-14.04.2-desktop-amd64.iso
    1.02GB 0:00:34 [30.4MB/s] [===============================================>] 100%            
    mount: block device /mnt/multimed-2/test/lubuntu/trusty-desktop-i386.iso is write-protected, mounting read-only
    < lubuntu-14.04.2-desktop-i386.iso pv > /mnt/target/lubuntu-14.04.2-desktop-i386.iso
     703MB 0:01:24 [8.29MB/s] [===============================================>] 100%            
    mount: block device /mnt/multimed-2/CD/ubuntu/12.04/ubuntu-12.04-desktop-i386.iso is write-protected, mounting read-only
    < ubuntu-12.04-desktop-i386.iso pv > /mnt/target/ubuntu-12.04-desktop-i386.iso
     701MB 0:00:46 [15.2MB/s] [===============================================>] 100%            
    mount: block device /mnt/multimed-2/CD/ubuntu/14.04/ubuntu-14.04.2-desktop-amd64.iso is write-protected, mounting read-only
    < ubuntu-14.04.2-desktop-amd64.iso pv > /mnt/target/ubuntu-14.04.2-desktop-amd64.iso
     996MB 0:00:59 [16.9MB/s] [===============================================>] 100%            
    mount: block device /mnt/multimed-2/CD/ubuntu/14.04/ubuntu-mate-14.04.2-LTS-desktop-i386.iso is write-protected, mounting read-only
    < ubuntu-mate-14.04.2-LTS-desktop-i386.iso pv > /mnt/target/ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    1.05GB 0:02:10 [8.23MB/s] [===============================================>] 100%            
    mount: block device /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-i386.iso is write-protected, mounting read-only
    < xubuntu-14.04.1-desktop-i386.iso pv > /mnt/target/xubuntu-14.04.1-desktop-i386.iso
     916MB 0:01:29 [10.3MB/s] [===============================================>] 100%            
    Syncing the target device ...
     The following iso files are found in the target drive:
    /mnt/target/kubuntu-14.04.2-desktop-amd64.iso
    /mnt/target/lubuntu-14.04.2-desktop-i386.iso
    /mnt/target/ubuntu-12.04-desktop-i386.iso
    /mnt/target/ubuntu-14.04.2-desktop-amd64.iso
    /mnt/target/ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    /mnt/target/xubuntu-14.04.1-desktop-i386.iso
    ---------------------------------------------------------------------------
    MODEL            NAME   FSTYPE LABEL     MOUNTPOINT   SIZE
    Extreme          sdd                                 29.8G
                     |-sdd1 vfat   multiboot                8G
                     `-sdd2 ext2   casper-rw                6G
    The target device is ready to use.
    '*.iso' was installed
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$
    3. Add another iso file to an existing [multi]boot pendrive.

    Code:
    sudo ./mk-grub-n-iso ~/Downloads/iso/ubuntu-mate-14.04.2-LTS-desktop-i386.iso /dev/sdx
    Code:
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso /mnt/multimed-2/CD/ubuntu/14.04/ubuntu-mate-14.04.2-LTS-desktop-i386.iso /dev/sdd
    [sudo] password for sudodus: 
    '/mnt/multimed-2/CD/ubuntu/14.04/ubuntu-mate-14.04.2-LTS-desktop-i386.iso' is identified as the source ISO file
    
    MODEL            NAME   FSTYPE LABEL     MOUNTPOINT                 SIZE
    Extreme          sdd                                               29.8G
                     |-sdd1 vfat   multiboot                              8G
                     `-sdd2 ext2   casper-rw /media/sudodus/casper-rw     6G
    
    Go ahead and overwrite /dev/sdd ? (g/q) g
    Using 'grub.cfg' in the current directory
    Using 'usb-pack_efi' in the current directory
    ---------------------------------------------------------------------------
    Create new system or Add new iso file? (c/a)? a
     FINAL WARNING:  Are you sure /dev/sdd ? (y/n) y
    ---------------------------------------------------------------------------
         Use gparted to check (and maybe change) the partitions
    ---------------------------------------------------------------------------
     The following iso files are found in the target drive:
    kubuntu-14.04.2-desktop-amd64.iso
    lubuntu-14.04.2-desktop-i386.iso
    ubuntu-12.04-desktop-i386.iso
    ubuntu-14.04.2-desktop-amd64.iso
    ubuntu-mate-14.04.2-LTS-desktop-i386.iso  is already installed.
    xubuntu-14.04.1-desktop-i386.iso
    Exiting. Add another iso file!
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso /dev/sdd
    '/mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso' is identified as the source ISO file
    
    MODEL            NAME   FSTYPE LABEL     MOUNTPOINT   SIZE
    Extreme          sdd                                 29.8G
                     |-sdd1 vfat   multiboot                8G
                     `-sdd2 ext2   casper-rw                6G
    
    Go ahead and overwrite /dev/sdd ? (g/q) g
    Using 'grub.cfg' in the current directory
    Using 'usb-pack_efi' in the current directory
    ---------------------------------------------------------------------------
    Create new system or Add new iso file? (c/a)? a
     FINAL WARNING:  Are you sure /dev/sdd ? (y/n) y
    ---------------------------------------------------------------------------
         Use gparted to check (and maybe change) the partitions
    ---------------------------------------------------------------------------
     The following iso files are found in the target drive:
    kubuntu-14.04.2-desktop-amd64.iso
    lubuntu-14.04.2-desktop-i386.iso
    ubuntu-12.04-desktop-i386.iso
    ubuntu-14.04.2-desktop-amd64.iso
    ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    xubuntu-14.04.1-desktop-i386.iso
    ======================
    libparted : 2.3
    ======================
    fatlabel: warning - lowercase labels might not work properly with DOS or Windows
    tune2fs 1.42.9 (4-Feb-2014)
    ---------------------------------------------------------------------------
    source=/mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso
    ---------------------------------------------------------------------------
    UEFI Bootloader:  Installing for i386-pc platform.
    Installation finished. No error reported.
    BIOS Bootloader (maybe complaints)  : Installing for i386-pc platform.
    Installation finished. No error reported.
    Copying files ...
    sending incremental file list
    ./
    EFI/
    EFI/BOOT/
    boot/grub/
    boot/grub4dos/
    boot/memtest/
    
    sent 360 bytes  received 40 bytes  266.67 bytes/sec
    total size is 2,310,239  speedup is 5,775.60
    mount: block device /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso is write-protected, mounting read-only
    < /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso pv > /mnt/target/xubuntu-14.04.1-desktop-amd64.iso
     930MB 0:01:25 [10.9MB/s] [===============================================>] 100%            
    Syncing the target device ...
     The following iso files are found in the target drive:
    /mnt/target/kubuntu-14.04.2-desktop-amd64.iso
    /mnt/target/lubuntu-14.04.2-desktop-i386.iso
    /mnt/target/ubuntu-12.04-desktop-i386.iso
    /mnt/target/ubuntu-14.04.2-desktop-amd64.iso
    /mnt/target/ubuntu-mate-14.04.2-LTS-desktop-i386.iso
    /mnt/target/xubuntu-14.04.1-desktop-amd64.iso
    /mnt/target/xubuntu-14.04.1-desktop-i386.iso
    ---------------------------------------------------------------------------
    MODEL            NAME   FSTYPE LABEL     MOUNTPOINT   SIZE
    Extreme          sdd                                 29.8G
                     |-sdd1 vfat   multiboot                8G
                     `-sdd2 ext2   casper-rw                6G
    The target device is ready to use.
    '/mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso' was installed
    sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$
    4. Create a portable system with a small footprint with a potential for isotesting

    This demo example features a new version of mk-grub-n-iso.

    i. The FAT32 boot partition is very small, and the iso files reside in an own partition will the ext4 file system, which is better when we expect to update these files during isotesting.

    ii. The sizes of the partitions do not match the recommended values. The isodevice partition is big, 5GB, to host several iso files. The whole pendrive is not used, because the system is prepared for a compressed image file, that should fit in a (slightly undersized) 8 GB pendrive (7,8 GB ~7.26 Gibibytes). Normally you should use the whole pendrive. See the attached screenshot, attachment #5.

    iii. There are additional tools, that come with the system in order to manage the iso files. links2check help managing the daily iso files, to install those you want and keep them up to date. mkusb-nox is an alternative to make another USB boot drive for Ubuntu-Server and Lubuntu Alternate, which cannot boot via 'grub-n-iso'.

    iv. When installed and running from the 'grub-n-iso' pendrive, change directory to '/isodevice' and run 'links2check'

    Code:
    $ sudo -H ./links2check


    Code:
    sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd isotest
    Code:
    sudodus@xw8400:/mnt/multimed-2/test/grub-n-iso/andre$ sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd isotest
    'lubuntu-14.04.2-desktop-i386.iso' is identified as the source ISO file
    ---------------------------------------------------------------------------
    links2check: iso files of the current developing version can be managed
    (downloaded and upgraded) in a multi-boot type pendrive.
    Select a stable system (released version) to have a working system
    even if the developing version is broken for a period of time!
    
    When installed and running from the 'grub-n-iso' pendrive, 
    change directory to '/isodevice' and run 'links2check'
    
    sudo -H ./links2check
    ---------------------------------------------------------------------------
    
    MODEL            NAME   FSTYPE LABEL       MOUNTPOINT   SIZE
    Extreme          sdd                                   14.6G
                     |-sdd1 vfat   lub14042-32               64M
                     |-sdd2 ext4   isodevice                  5G
                     `-sdd3 ext4   casper-rw                2.2G
    
    Go ahead and overwrite /dev/sdd ? (g/q) g
    Using 'grub.cfg' in the current directory
    Using 'usb-pack_efi' in the current directory
    ---------------------------------------------------------------------------
    Create new system or Add new iso file? (c/a)? c
    FINAL WARNING:  Are you sure /dev/sdd ? (y/n) y
    1024+0 records in
    1024+0 records out
    1048576 bytes (1.0 MB) copied, 0.16773 s, 6.3 MB/s
    ---------------------------------------------------------------------------
         Use gparted and create an msdos partition table
    ---------------------------------------------------------------------------
    Suggested values, may be changed according to the size of
    lubuntu-14.04.2-desktop-i386.iso
    /dev/sdd1:  file system= fat32   size= 64  Mibibytes for the grub files
    /dev/sdd2:  file system= ext4   size= 787  Mibibytes or more* for iso files
    /dev/sdd3:  file system= ext4   size=the rest of device for persistence
    *) If you want to update the iso file here, you should have space for a
       temporary iso file while updating, so approximately an extra Gibibyte.
       You might also reserve space for installing more iso files later on.
    ======================
    libparted : 2.3
    ======================
    Information: You may need to update /etc/fstab.                           
    
    fatlabel: warning - lowercase labels might not work properly with DOS or Windows
    tune2fs 1.42.9 (4-Feb-2014)
    tune2fs 1.42.9 (4-Feb-2014)
    tune2fs 1.42.9 (4-Feb-2014)
    ---------------------------------------------------------------------------
    source=lubuntu-14.04.2-desktop-i386.iso
    ---------------------------------------------------------------------------
    UEFI Bootloader:  Installing for i386-pc platform.
    Installation finished. No error reported.
    BIOS Bootloader:  Installing for i386-pc platform.
    Installation finished. No error reported.
    Copying files ...
    sending incremental file list
    ./
    EFI/
    EFI/BOOT/
    EFI/BOOT/bootia32.efi
    EFI/BOOT/bootx64.efi
    boot/
    boot/grub/
    boot/grub/menu.lst
    boot/grub4dos/
    boot/grub4dos/g2ldr
    boot/grub4dos/grub.exe
    boot/memtest/
    boot/memtest/memtest.bin
    boot/memtest/memtest86+-5.01.bin
    
    sent 2,311,447 bytes  received 188 bytes  4,623,270.00 bytes/sec
    total size is 2,310,239  speedup is 1.00
    mount: block device /mnt/multimed-2/CD/ubuntu/14.04/lubuntu-14.04.2-desktop-i386.iso is write-protected, mounting read-only
    'grub.cfg' -> '/tmp/isotrg/grub.cfg'
    'links2check' -> '/tmp/isotrg/links2check'
    'mkusb-nox' -> '/tmp/isotrg/mkusb-nox'
    < lubuntu-14.04.2-desktop-i386.iso pv > /tmp/isotrg/lubuntu-14.04.2-desktop-i386.iso
     703MB 0:00:14 [48.8MB/s] [=====================================================>] 100%            
    Syncing the target device ...
    MODEL            NAME   FSTYPE LABEL       MOUNTPOINT   SIZE
    Extreme          sdd                                   14.6G
                     |-sdd1 vfat   lub14042-32               64M
                     |-sdd2 ext4   isodevice                  5G
                     `-sdd3 ext4   casper-rw                2.2G
    The target device is ready to use.
    'lubuntu-14.04.2-desktop-i386.iso' was installed
    
    When installed and running from the 'grub-n-iso' pendrive,
    change directory to '/isodevice' and run 'links2check'
    
    sudo -H ./links2check
    
    sudodus@xw8400:/mnt/multimed-2/test/grub-n-iso/andre$
    F. System requirements

    1. Host system

    An Ubuntu family operating system of version 14.04 LTS or newer.

    It is possible to use Ubuntu 12.04 LTS too, but it has an older version of grub, and it can only make pendrives that boot in BIOS mode. Other linux distros are not tested.

    Current LTS systems:

    - Ubuntu 14.04 has grub version 2.02~beta2-9ubuntu1 and makes systems that work in UEFI mode and BIOS mode
    - Ubuntu 12.04 has grub version 1.99-21ubuntu3.17 and makes systems that work in BIOS mode

    - Example: HP Elitebook 8560p is typical of 'middle-aged to newer' HP professional class laptops that 'are difficult to boot from USB via grub'. Booting from grub2 works with the version of grub that comes with Ubuntu 14.04 LTS, but only when the boot flag is added to the partition.

    2. The installer 'mk-grub-n-iso' uses bash and built-in commands.

    'gparted' is used to create and edit partitions and create file systems. There must be a graphical mode for gparted to work.

    Code:
    sudo apt-get install gparted
    You may appreciate the improved feedback during the copying process with 'pv'.

    Code:
    sudo apt-get install pv
    3. Computer

    'mk-grub-n-iso' does not need much computing power or RAM. It is possible to use 32-bit as well as 64-bit PCs (with Intel or AMD processors).

    4. Target system

    Automatic configuring for current Ubuntu family desktop iso files. Ubuntu 12.04 LTS works well as target system.

    Manual configuring (creating the menuentries) using for example this link

    https://wiki.archlinux.org/index.php...boot_USB_drive

    5. Target computer

    The target computers, where grub-n-iso_multiboot pendrives can run, include BIOS and UEFI mode, 32-bit and 64-bit hardware, 32-bit and 64-bit operating systems.

    The system created by demo run 1:

    Code:
    sudo ./mk-grub-n-iso ~/Downloads/iso/lubuntu-14.04.2-desktop-i386.iso /dev/sdx
    can boot most PCs.

    - There is a hardware limit. The computer may be too weak to boot a current version of Lubuntu, or there is some hardware, for example graphics chip, where the available drivers do not work. But then it is possible to include iso files for other linux distros.

    - Another limit is where the system is so locked down by a non-standard UEFI system, that nothing but Windows works.
    Attached Images Attached Images
    Last edited by sudodus; June 26th, 2015 at 07:47 PM. Reason: attached files and demo runs, grub.cfg source, boot flag for middle-aged HPs, links2check for isotest

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

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

    Booting linux via grub does not use the boot flag, but the BIOS of 'middle-aged to newer' HP computers needs the boot flag to recognize a USB pendrive as a boot drive.

    - Example: HP Elitebook 8560p is typical of 'middle-aged to newer' HP professional class laptops that 'are difficult to boot from USB via grub'. Booting from grub2 works with the version of grub that comes with Ubuntu 14.04 LTS, but only when the boot flag is added to the partition.

    I think a boot flag will do no harm in other computers, so I added a boot flag to these grub-n-iso systems, to the uploaded compressed image files as well as in the shell-script mk-grub-n-iso.

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

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

    I have prepared a new version of the shell-script mk-grub-n-iso and a new shell-scripts links2check and links2update. This will offer a new possibility to make a multiboot pendrive with the same properties as described earlier in this thread: they work in (almost) all PC computers. You will be able to manage the daily build iso files of the Ubuntu family flavours, to install and update them incrementally directly in the pendrive, which saves time and effort. So it should be a convenient tool for all our iso-testers as well as for other people who want to try the bleeding edge version.

    You are welcome to ask questions and suggest improvements


    Create or download a portable system with a small footprint with a potential for isotesting


    1. Create the system according to 'Demo run' 4 in post #8 or

    2. Download a compressed image file - an upgraded version of the system in post #6

    A compressed image file is made from a system that boots via grub and a Lubuntu iso file. The intention is to have one USB pendrive, which can boot the vast majority of computers. This is a smaller and simpler alternative than what is described in post #1, with the additional benefit, that it can easily be maintained with the daily build of the developing version of Ubuntu and the Ubuntu flavours.

    The integrity is checked with md5sum, and the iso files are updated incrementally with rsync from the Ubuntu server. This is done automatically, but must be started by you. The intention is not to kill the server by continuous requests, but you initiate a request, when you have time to test an iso file

    The grub system works in UEFI and BIOS mode. It is developed from a multiboot system for UEFI by Andre Rodovalho. See the following link,

    How to Create a EFI/UEFI GRUB2 Multiboot USB drive to boot ISO images


    Lubuntu 14.04.2 LTS 32-bit: works with 32-bit processors and 64-bit processors in old, middle-aged and new computers. The boot option forcepae should be used when installing Lubuntu into computers with Pentium M and Celeron M processors that lack the PAE flag.

    Lubuntu is booted via grub and the standard Lubuntu ISO file, but in a new way, that allows it to work in both UEFI and BIOS mode. A partition with the label casper-rw provides persistence. Other versions and flavours, also the daily built ISO files will be booted in the same way.

    Installation

    Install from the compressed image files

    dd_lubu-14.04.2-desktop-i386_isotest_7.8GB.img.xz
    dd_lubu-14.04.2-desktop-i386_isotest1_7.8GB.img.xz, links2update added and some tweaks saved in the casper-rw partition.
    dd_lubu-14.04.2-desktop-i386_isotest2_7.8GB.img.xz, some tweaks saved in the .bashrc file in the home-rw partition.

    with the following md5sums (and sizes 695, 698, 733 Mibibytes compressed).

    Code:
    25303e85a9b2c026ff4e68d24dba3fc1  dd_lubu-14.04.2-desktop-i386_isotest_7.8GB.img.xz
    6621a6bd66296a7fc11a8eca7ddc1fe6  dd_lubu-14.04.2-desktop-i386_isotest1_7.8GB.img.xz
    97e9113c4d94e12992f76f004bb8cef1  dd_lubu-14.04.2-desktop-i386_isotest2_7.8GB.img.xz
    to a USB pendrive (8 GB or more) with mkusb in linux or Win32 Disk Imager in Windows, which is described in the following links

    Linux

    It is straight-forward with mkusb in linux according to https://help.ubuntu.com/community/mkusb

    Windows

    In Windows you should expand the compressed image file with for example 7-zip before using Win32 Disk Imager.

    Download the following help programs
    http://www.md5summer.org
    http://www.7-zip.org
    http://sourceforge.net/projects/win32diskimager

    First check that the download was successful with md5summer.

    Next extract the image file with 7-zip (It is also possible with winzip)

    from dd_lubuntu-14.04.2-desktop-i386_4GB.img.xz to dd_lubuntu-14.04.2-desktop-i386_4GB.img

    And then use Win32 Disk Imager according to https://wiki.ubuntu.com/Win32DiskImager/iso2usb

    Method

    I made this system for USB pendrives to boot all PC (Intel/AMD) computers - 'grub-n-iso' - according to this link

    Enjoy

    - 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 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 (made for persistence).

    But Windows can only read from the first partition, which is very small in this case. Build your own system according to post #8 if you want a bigger first partition for transfer of files to and from Windows.

    - Persistence

    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.

    There might be problems if you use the casper-rw partition for different iso files and install program packages. Data files can be shared without problems. If the persistence is damaged, you can always remove all files, or simply format it (make a new ext4 file system and turn of journaling for speed and decreased wear).

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

    - Expand the FAT32 partition 'grow it'

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

    Use the unallocated space, if there is space behind the second partition (in a bigger than 8 GB pendrive). You can move the casper-rw partition in order to increase the size of the FAT32 partition to make room for another iso file or increase the size of the casper-rw partition or create a completely new partition. 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.)

    It is also possible to run this system from HDD or SSD in an external USB 3 and eSATA box. That can make it almost as fast as running from an internal drive, but if you are testing to install, it is a better idea to use the fast drive as target for the installation.

    - Manage the daily built iso files of your choice

    Notice that a pendrive with this system can be upgraded directly. So you get the upgrade directly from the Ubuntu server to the pendrive without a detour to a hard disk drive.

    When installed and running from the 'grub-n-iso' pendrive, change directory to /isodevice and run links2check

    Code:
    cd /isodevice
    sudo -H ./links2check
    sudo -H ./links2update
    to maintain the system. There are more details in the next post #11.

    Use mkusb-nox to install from the Ubuntu Server and Lubuntu alternate iso files, that do not boot via grub.

    See also ...

    http://phillw.net/isos/linux-tools/uefi-n-bios/

    https://help.ubuntu.com/community/In...n/FromUSBStick
    Last edited by sudodus; August 6th, 2015 at 07:31 PM. Reason: mk-grub-n-iso 1.2, links2check &links2update

Page 1 of 17 12311 ... LastLast

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
  •