Results 1 to 2 of 2

Thread: the down and dirty way to make a Linux install USB

  1. #1
    Bong Tester q's Avatar
    Join Date
    Oct 2014
    Location
    under the HID
    Posts
    2,127

    the down and dirty way to make a Linux install USB

    i have been asked how to make a Linux flash drive installation medium and i thought i would share with the lurkers

    its REAL simple, but REAL dangerous to use *my* method... you also need to be already using Linux or i guess have the BASH bullshit that Ubuntu and Microsoft made... if you are on Microsoft or if you do not have a clue WTF i am saying below, this is not the way for you and you need to Google something called Unetbootin and have fun with that... course, me personally, i dont know how to do it that way... too damn complicated... so on with the easy and dangerous way

    step one, go grab an ISO (disk image) of the Linux you want to install... or actually, i would guess any operating system... or even any ISO... but all i know for sure right now is grab a Linux ISO... as of now, i still advocate the use of SolydK.

    after that, you will need to go to your shell... Terminal or Konsole is what you may know it as... ye olde "command prompt" screen and then change directories to where you downloaded the ISO to... in my case, that is:

    Code:
    /home/q/Downloads/
    and the ISO name is:

    Code:
    solydk_9_64_201707.iso
    to make things easier, we are gonna login as root user through sudo instead of keep typing sudo before each line and periodically being nagged for our root password... soooo we type:

    Code:
    sudo -i
    and give the password when asked.

    next we want to type:

    Code:
    fdisk -l
    and this is where it gets tricky

    do NOT let this next wall of text dissuade you! there really isnt a lot of data here we care about, but i am gonna show you what my fdisk shows:

    Code:
    Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: <redacted>
    
    Device         Start        End   Sectors   Size Type
    /dev/sda1       2048  102402047 102400000  48.8G Linux filesystem
    /dev/sda2  102402048  716802047 614400000   293G Linux filesystem
    /dev/sda3  716802048 1465147391 748345344 356.9G Linux filesystem
    
    Disk /dev/sdb: 15 GiB, 16079781888 bytes, 31405824 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: <redacted>
    
    Device     Boot    Start      End  Sectors  Size Id Type
    /dev/sdb1  *          63  4771304  4771242  2.3G  b W95 FAT32
    /dev/sdb2        4771305 17061029 12289725  5.9G  b W95 FAT32
    /dev/sdb3       17061030 31391009 14329980  6.9G 83 Linux
    
    Disk /dev/sdc: 14.9 GiB, 16008609792 bytes, 31266816 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: <redacted>
    
    Device     Start     End Sectors  Size Type
    /dev/sdc1     64     359     296  148K Microsoft basic data
    /dev/sdc2    360    6119    5760  2.8M EFI System
    /dev/sdc3   6120 3129847 3123728  1.5G Microsoft basic data
    what this shows us is all the hard drives i have installed... i have three of them going, each with three partitions... the first is sda and that is my actual hard drive... do NOT FUCK WITH IT OR ANY OF ITS PARTITIONS! you WILL break your system if you do

    the second is sdb and that is one of my USB drives...

    the third is sdc and that is our target USB device for this... how do i know? i plugged it in, didnt i? how will you know? well, we can go ahead and assume you are smarter than i am and will only have one USB stick plugged in and that should make it a lot easier for you to find what will probably be listed as sdb.

    remove the USB stick and do the fdisk bit again and see if it disappears is a good way to check yourself before you wreck yourself

    if you are sure you have your USB stick identified, its time to continue... and THIS IS WHERE IT GETS DANGEROUS.

    we are going to use a tool called "dd" and its real name is Disk Duplicator but those of us who have used it know its true name: the Disk Destroyer... typos are very_bad

    on my system, to put the Solyd ISO on the third drive i have, the command is:

    Code:
    dd if=/home/q/Downloads/solydk_9_64_201707.iso of=/dev/sdc bs=4M && sync
    change to your path of the download and filename of your ISO... and you will prolly be wanting sdb, not sdc at the very end... notice there is NO trailing / !!

    there is no progress meter or anything, you just wait for your shell to give you a command prompt. DO NOT REMOVE THE USB till its done!!

    on my system, this took about seven minutes to make my USB stick... i then went to my other machine, booted off it and had a nice fresh install of the brand new SolydK 9

    my final fdisk -l just for grins:

    Code:
    Disk /dev/sda: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: <redacted>
    
    Device         Start        End   Sectors   Size Type
    /dev/sda1       2048  102402047 102400000  48.8G Linux filesystem
    /dev/sda2  102402048  716802047 614400000   293G Linux filesystem
    /dev/sda3  716802048 1465147391 748345344 356.9G Linux filesystem
    
    Disk /dev/sdb: 15 GiB, 16079781888 bytes, 31405824 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: <redacted>
    
    Device     Boot    Start      End  Sectors  Size Id Type
    /dev/sdb1  *          63  4771304  4771242  2.3G  b W95 FAT32
    /dev/sdb2        4771305 17061029 12289725  5.9G  b W95 FAT32
    /dev/sdb3       17061030 31391009 14329980  6.9G 83 Linux
    
    Disk /dev/sdc: 14.9 GiB, 16008609792 bytes, 31266816 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: <redacted>
    
    Device     Boot Start     End Sectors  Size Id Type
    /dev/sdc1  *       64 3993791 3993728  1.9G  0 Empty
    /dev/sdc2         324    4419    4096    2M ef EFI (FAT-12/16/32)
    it took FAR longer to type all this mess than it did to do it... and the danger warned about above is from typos or telling dd to use the wrong drive... pay attention and its easy

    its three simple commands (four with the change directory) and the only edits are to change the file name and change the drive designation... REAL simple! but so is pushing the gas peddle on yer car and driving into a wall
    Last edited by q; 07-25-2017 at 01:04 AM. Reason: updated with more betterness (and a couple more times cause i am too stoned for this shit)
    "the only difference between Science and screwing around is writing it down."

  2. #2
    Senior Member Archimage's Avatar
    Join Date
    Oct 2014
    Posts
    296
    Okay, I think I'm going to need to ask a few questions first. I did skim the write up, and need to read it for real when I've got a minute.
    Anyways, thank you so much for writing this up for me!!! I am soo fuckin tired of windblows..

Posting Permissions

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