Page 108 of 126 FirstFirst ... 85898106107108109110118 ... LastLast
Results 1,071 to 1,080 of 1252

Thread: Howto make USB boot drives

  1. #1071
    Join Date
    Dec 2005
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Howto make USB boot drives

    @sudodus - Thanks for your help. As it turns out, the plan to erase an old laptop and install Win 8 or 10 on that, have now come to a halt. I had no end of problems with trying to use the Microsoft ISO and a purchashed key, plus it does seem the HDD is well on its way out. It also seemed the MS install wrote to the USB, as the usb had errors ??

    It was hard to determine if the problems were on the usb or not, but I suspect the usb was fine. I even tried this

    Code:
    mkusb-nox Win8.1_English_x64.iso
    but then after spending most of the day on it, there arose a "loop situation" where the attempted installs appeared to only partially work, take out the media, restart, .. again and again. I need to forget about doing this on that old (now "cactus") laptop.

    Quote Originally Posted by C.S.Cameron View Post
    @oygle,

    I have tried to make simple step by step instructions for installing Windows using mkusb-plug.

    https://askubuntu.com/questions/1274...274975#1274975
    Thank you, I have made a note of that.

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

    Re: Howto make USB boot drives

    @oygle,

    mkusb-nox does not work with newer versions of Windows, that 'want to' create a file greater than 4 GB. Nowadays I would recommend mkusb-dus or mkusb-plug instead.

    - Is there any sign of failure (error message or warning message) when you try to create the Windows installer in the USB drive?

    - Please use mkusb-dus to wipe the whole USB pendrive 'Wipe the whole device'. After that it may behave better.

    - Please check that the internal drive is good. See this link about S.M.A.R.T. information.



    Edit:

    If you want to run in text mode, you can run mkusb-tow directly (instead of mkusb-nox). mkusb-tow is called from the GUIs of mkusb-dus and mkusb-plug. But it is safer to start it via a GUI (to get the correct target device).

    Code:
    $ mkusb-tow
     Run 'mkusb-tow' with sudo or as root 
    ------------- mkusb-tow makes it safer to create a boot drive -------------
    From Windows iso file create installer in e.g. USB pendrive or memory card
    Usage:
     sudo /path/mkusb-tow <source file> <target device> 
    Example:
     sudo mkusb-tow windows.iso /dev/sdx
    Help:
    mkusb-tow -h
    Version:
    mkusb-tow -v
    Available devices 
    NAME      SIZE TRAN   MODEL
    sda     238,5G sata   SanDisk SD6SB1M2
    sdb       3,7T sata   WDC WD4002FYYZ-0
    sdc      14,6G usb    Extreme         
    nvme0n1 232,9G nvme   KINGSTON SA2000M8250G
    Last edited by sudodus; March 30th, 2021 at 09:14 AM. Reason: tip about mkusb-tow

  3. #1073
    Join Date
    Dec 2005
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Howto make USB boot drives

    @sudodus, Thanks very much for your help.

    Quote Originally Posted by sudodus View Post
    mkusb-nox does not work with newer versions of Windows, that 'want to' create a file greater than 4 GB. Nowadays I would recommend mkusb-dus or mkusb-plug instead.
    That could well have been the problem.

    Quote Originally Posted by sudodus View Post
    - Is there any sign of failure (error message or warning message) when you try to create the Windows installer in the USB drive?
    No, none at all, whether I used the gui or the command line of mkusb and the tools included with it, all actions were fine, no errors.

    Quote Originally Posted by sudodus View Post
    - Please use mkusb-dus to wipe the whole USB pendrive 'Wipe the whole device'. After that it may behave better.

    - Please check that the internal drive is good. See this link about S.M.A.R.T. information.
    Thanks, yesterday I did actually get to install the Win 8.1 by modifying a registry key, so it's all okay now, thanks for your help.

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

    Re: Howto make USB boot drives

    mkusb version 12.7.0, 12.7.1, 12.7.2

    - mkusb 12.7.0
    * dus: p_checkpoint: full lsblk output to zenity
    * mkusb-plug: srctst and mkusb-sedd: puer:
    . identify new versions of Ubuntu (.disk/info)
    . and and a minor cosmetic tweaks (zenity window size)

    - mkusb 12.7.1
    * dus-persistent: probe_source: upefi [from now] always default for debian

    - mkusb 12.7.2
    * dus 12.7.2 and mkusb-plug 2.8.6 with several sub-scripts: quoted grep 'patterns'

    Improvement in program package mkusb version 12.7.0

    - dus 12.7.0: p_checkpoint: full lsblk output to zenity

    The zenity window will show the full output of lsblk
    Code:
    lsblk -o MODEL,NAME,FSTYPE,LABEL,SIZE "$target"
    in order to make it easier than before to identify the target device and avoid mistakes.

    - mkusb-plug 2.8.5: srctst: added a second test to identify newer versions of Ubuntu iso files and a minor cosmetic tweak (zenity window size)

    - mkusb-sedd 2.8.5: puer: added a second test to identify newer versions of Ubuntu iso files and some minor cosmetic tweaks (zenity window size etc)

    Improvement in program package mkusb version 12.7.1

    - dus-persistent 12.7.1: probe_source: upefi [from now] always default for debian

    This is a simplification because upefi (usb-pack-efi) works in all current and recently deprecated Debian versions. The new version tested is Debian Bullseye alias version 11: using the file debian-live-11.0.0-amd64-standard.iso

    Improvement in program package mkusb version 12.7.2

    dus 12.7.2 and mkusb-plug 2.8.6 with several sub-scripts: quoted grep 'patterns' (that were previously not quoted and vulnerable to unexpected results when there are certain file names).



    Unstable: You get/update this new version of mkusb from the unstable PPA via the following commands

    Code:
    sudo add-apt-repository universe     # this line only for standard Ubuntu
    
    sudo add-apt-repository ppa:mkusb/unstable
    sudo apt update
    sudo apt install mkusb           # to install
    # sudo apt full-upgrade          # upgrade to current version (with all other upgrades), only for installed systems
    
    sudo apt install mkusb guidus dus mkusb-common  # to upgrade all mkusb basic components including dus
    
    sudo apt install usb-pack-efi    # for persistent live drives that work in UEFI and BIOS mode with 32-bit iso files
    You get only the version dus (alone or with guidus) via one of the following commands (if you don't care about mkusb-11, mkusb-nox, mkusb-bas)

    Code:
    sudo apt install dus
    sudo apt install guidus
    You get only the version mkusb-plug via [the update command and] the following command,

    Code:
    sudo apt update
    sudo apt install mkusb-plug
    Alternative way to get mkusb: There are tarballs at

    - help.ubuntu.com/community/mkusb/gui/tarball with only dus and guidus (mkusb version 12),

    - help.ubuntu.com/community/mkusb/plug with only mkusb-plug.



    Stable: mkusb version 12.7.1 is in the stable PPA. The policy is to test mkusb for a long time and in several environments before it is uploaded to the stable PPA (unless there are minor tweaks or bug-fixes).

    You get/update this version via the following commands

    Code:
    sudo add-apt-repository universe      # this line only for standard Ubuntu
    
    sudo add-apt-repository ppa:mkusb/ppa
    sudo apt update
    sudo apt install mkusb            # to install
    # sudo apt full-upgrade           # upgrade to current version (with all other upgrades), only for installed systems
    
    sudo apt install usb-pack-efi     # for persistent live drives that work in UEFI and BIOS mode with 32-bit iso files
    You get only the version dus (alone or with guidus) via one of the following commands (if you don't care about mkusb-11, mkusb-nox, mkusb-bas)

    Code:
    sudo apt install dus
    sudo apt install guidus
    You get only the version mkusb-plug via [the update command and] the following command,

    Code:
    sudo apt update
    sudo apt install mkusb-plug
    Usually there is drive space enough to install all the following mkusb packages explicitly:

    Code:
    sudo apt update
    sudo apt install mkusb guidus mkusb-plug usb-pack-efi

    Please notice that if you have already installed mkusb-plug or dus/guidus from a tarball, you had better remove that version when you install via PPA. The advantage with the PPA version is that it gets updated/upgraded automatically along with other program packages that are installed from the Ubuntu repositories.
    Last edited by sudodus; November 22nd, 2021 at 02:29 PM. Reason: minor edits; 12.7.1 added; 12.7.1 copied to the stable PPA: 12.7.2 added

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

    Re: Howto make USB boot drives

    The following link suggests a work-around for a question at AskUbuntu,

    "How to preserve and freeze modification made during a LiveSession of LiveDisc and to prevent any further modification without remastering the LiveDisc".

    Custom LiveDisc: Workaround using a persistent live system

    I have tested a step further on this path, to actually run live (live-only with or without toRAM). And it seems to work (at least in the current Lubuntu Impish iso file, to be released as version 21.10).

    Summary:

    - Create a persistent live Ubuntu family system with mkusb

    - Boot persistent live and modify your system to get the custom system that you want

    - Boot live and create a tarball with 'backup' in the 'usbdata' partition.

    - Run 'extractor4live' and your live system is now the custom system.

    - Next time run 'extractor4live' again ...

    Encryption?

    - The tarball is not encrypted. I think it can be left to the end user, who wants encryption, to replace the tarball with an encrypted zip-file. This is a rather simple encryption, but maybe enough for a private user. An installed system with LVM and LUKS-encrypted disk can be recommended for more advanced encryption.

    extractor4live:
    Code:
    #!/bin/bash
    
    grep ' persistent' /proc/cmdline
    if [ $? -eq 0 ]
    then
     echo persistent
     echo 'You should use this shellscript when booted live (live-only)'
    else
     echo live
     usbd=$(find /media/ -name "extractor4live" | head -n1)
     usbd=${usbd%/*}
     cd /
     sudo tar --exclude=./upper/usr/lib/systemd/* --strip-components=2 \
          -xvf "$usbd"/1-writable.tar.gz ./upper/ \
          > "$usbd"/list4live.log  2> "$usbd"/error4live.log
    fi
    Please test the following instructions, and give me feedback, particularly if something must be improved

    README:
    Code:
    Instructions about the files in this directory
    
    1. Backup and restore
    
    The file 'backup' must be run when booted live, and it will backup the content of the
    partition for persistence.
    
    ./backup
    
    It will create one tarball each time,
    
    1-writable.tar.gz
    2-writable.tar.gz
    ...
    
    The file 'restore' must be run when booted live, and it will restore content of the
    partition for persistence from the selected tarball.
    
    ./restore
    
    2. Running a custom system live (live-only)
    
    2.1 Modify the system by running a persistent live system,
    
    install tools
    tweak the appearance
    ...
    
    2.2 Boot live, change directory to this one (usbdata) and run 'backup'
    
    Now you have a tarball. Normally one tarball, '1-writable.tar.gz'.
    
    2.3 If you wish, you can change the label of the partition for persistence to
    something else than 'writable' or 'casper-rw', for example 'ext-data'. This will
    make the drive live-only (until you change the label back again).
    
    3. Make the live system into your custom system
    
    You can run live or live + toRAM. And you can repeat this many times.
    
    3.1 Boot live, change directory to this one (usbdata) and run 'extractor4live'
    
    ./extractor4live
    
    It will extract what is stored in the tarball '1-writable.tar.gz' to the live system,
    
    and write to the log files
    
    error4live.log
    list4live.log
    
    I have seen the following errors, but do not know yet, if they cause problems.
    
    tar: rofs: Cannot utime: Read-only file system - OK
    tar: rofs: Cannot change ownership to uid 0, gid 0: Read-only file system - OK
    tar: etc/xdg/autostart/gnome-software-service.desktop: Cannot mknod: Operation not permitted - OK
    tar: etc/security/limits.d/audio.conf.disabled: Cannot mknod: Operation not permitted - ?
    tar: Exiting with failure status due to previous errors - only 'summary'
    
    Please check for errors and report bugs, that may be related to them.
    
    3.2 Change directory to your home and enjoy :-)
    
    cd
    
    3.2 More than one custom live system
    
    If you have two or more tarballs, you can make extractor files for each of them.
    
    4. Start using your custom live system
    
    When you shutdown or reboot, what you have done in the live system is forgotten,
    except if you store things in the 'usbdata' partition or the 'ext-data' partition.
    So normally you should change directory to your home and enjoy :-)
    
    cd
    Last edited by sudodus; August 2nd, 2021 at 09:04 PM. Reason: yet another version of extractor4live and matching README; question about encryption

  6. #1076
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Smile Re: Howto make USB boot drives

    Quote Originally Posted by sudodus View Post
    mkusb version 12.7.0

    - dus 12.7.0: p_checkpoint: full lsblk output to zenity

    The zenity window will show the full output of lsblk
    Code:
    lsblk -o MODEL,NAME,FSTYPE,LABEL,SIZE "$target"
    in order to make it easier than before to identify the target device and avoid mistakes.
    Thank you !!

    I LOVE that feature !!

  7. #1077
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Howto make USB boot drives

    re extractor4live:
    I get Syntax error: end of file unexpected (expecting "then"), when trying to run the script.
    I'm not very good at scripts.

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

    Re: Howto make USB boot drives

    @C.S.Cameron,

    Sorry, the script is kind of rough, not very user friendly (yet), but I don't get that error. There should be a 'then' after the line with 'if', and there is unless you did not get it right when copy/pasting it into an editor. The last line should contain 'fi' (not 'if'), which is closing the if-statement (if-then-else-fi). Maybe that is the problem?

    When booted live you should first create a 'backup' tarball of the partition for persistence, and put this file 'extractor4live' into the NTFS file system of 'usbdata', and then run it to get the 'custom live' system.
    Last edited by sudodus; August 11th, 2021 at 08:49 AM.

  9. #1079
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Howto make USB boot drives

    Do I need to activate the script with chmod +x ?
    I made the tarball by running the /usbdata/backup script
    I copy / pasted the extractor4live script from page 108.
    I double checked every item you mentioned, still no luck.

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

    Re: Howto make USB boot drives

    - I think all files in usbdata will be executable by default (because of the way it is automounted).

    - It should not complain expecting "then". Please check the md5sum,
    Code:
    $ md5sum extractor4live readme.e2l
    0a906573c175eec439d5898067a10efd  extractor4live
    400cd939afb1a54d99809bfc4730fbf1  readme.e2l
    It is possible that I uploaded and edited the file code in the post. Please tell the web browser to re-read the page so that your browser will display a current version of the file code. (Today I copied and pasted it into an editor and wrote it to another file name and checked that it is what it is supposed to be with diff and with md5sum.)

    I can upload 'extractor4live' and 'readme.e2l' to a server, where you can download them.

    See phillw.net/isos/linux-tools/mkusb

Page 108 of 126 FirstFirst ... 85898106107108109110118 ... 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
  •