LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2016, 02:14 PM   #16
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176

Quote:
Originally Posted by yancek View Post
Startup Disk Creator is used to create a bootable Live installation CD on a flash drive and it is not an installed system. The purpose of it is to have a Live CD you can use to test whichever Linux you are using as well as to use it to actually install to another hard drive or flash drive. No, Startup Disk creator is not a full install.
Thanks yancek. But I used Startup Disk Creator yesterday and put Bodhi onto a machine and it then gave me the option to install it, which I did.

Quote:
Originally Posted by yancek View Post
Persistence lets you save some data and changes to your flash drive as pointed out above. If you use a FAT32 formatted flash drive to put your Xubuntu on it, then your persistence file is limited to 4GB. You can create a persistent 'partition' that is larger using a Linux filesystem.
Good to know. But my primary concern is just installing the OS permanently. If I ever get into using the bootable as a thing I use over and over I'll use Linux filesystems instead of FAT32.

Quote:
Originally Posted by yancek View Post
Never heard of mkusa but there is software called "mkusb" which creates a bootable flash drive of Ubuntu with persistence and also with the first partition on it as ntfs so you can use it to have data accessible from Linux or windows. If you want to try it, the link below has instruction on how to get it and how to use.

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

If you want to simply install to a flash drive, you can do that either with another bootable flash drive or with a DVD. If you expect to use it on multiple computers, don't install any proprietary software such as graphics drivers.
"mkusa" was a typo. Sorry. It is "mkusb." Thanks for the link, and yeah, I do want to try it because it supposedly takes the risk out of the "dd" way of doing it (and wiping out the wrong drive), but still it seemed pretty complicated.
 
Old 04-04-2016, 02:16 PM   #17
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Germany_chris View Post
Computers are appliances now and have been for many years
Yes. Thank you Chris.
 
Old 04-04-2016, 02:21 PM   #18
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by erik2282 View Post
yanecek said was I was going to say. "Startup Disk Creator is used to create a bootable Live installation CD on a flash drive and it is not an installed system."

Once your computer boots to the USB, you can choose to install, make changes to the filesystem on the hard drive in the computer, or just test/play in the live image.
Thanks erik. So what's the difference really? It sounds like Starup Disk Creator gives the option of using the bootable flash drive over and over and over (because it makes it with "persistence") or you can just test the OS or you can install it permanently. It seems ideal.

Quote:
Originally Posted by erik2282 View Post

Personally, I use the dd command in a terminal when making bootable USB's.

https://community.linuxmint.com/tutorial/view/744

this is an example of what i do:

Code:
root@myserver:~# dd if=/home/erik/Downloads/debian-live-8.3.0-amd64-kde-desktop.iso of=/dev/sdb oflag=direct bs=1048576
you have to be ABSOLUTELY sure that /dev/sdb is your flash drive, if you get this part wrong, you can overwrite the wrong hard drive. use this with caution.
Thanks for the tutorial and your example. (Examples really help.) I'll do it in the terminal one day but for now as you say...

Quote:
Originally Posted by erik2282 View Post
Actually you may be better off with a GUI tool.
Exactly.
 
Old 04-04-2016, 02:25 PM   #19
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by beachboy2 View Post
Gregg,

I second erik2282's suggestion to use the dd command but please be very careful otherwise you can easily wipe the wrong drive!!

Look at post #7 here:

http://www.linuxquestions.org/questi...ss-4175563817/
Great tutorial, beachboy2. Thanks. The first time I try DD I will follow it religiously.
 
Old 04-04-2016, 02:57 PM   #20
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
and don't assume that if fdisk -l shows the usb as being /dev/sdb or what ever it happens to be that it will be the same on a reboot, especially if you leave the usb in during the reboot. Always run fdisk -l before using dd to make sure the dev naming of the usb hasn't changed.
 
2 members found this post helpful.
Old 04-04-2016, 03:17 PM   #21
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by colorpurple21859 View Post
and don't assume that if fdisk -l shows the usb as being /dev/sdb
+1

Agreed, and just to be clear, /dev/sdb just happened to be the flash drive I was using when I ran that command. Anyone else's can be something different.
 
1 members found this post helpful.
Old 04-04-2016, 04:03 PM   #22
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by colorpurple21859 View Post
and don't assume that if fdisk -l shows the usb as being /dev/sdb or what ever it happens to be that it will be the same on a reboot, especially if you leave the usb in during the reboot. Always run fdisk -l before using dd to make sure the dev naming of the usb hasn't changed.
Thanks colorpurple. You know, I have a hard time figuring out what's what in the terminal. I do stuff there but I'm always using 'pwd' to figure out where the heck I am. And figuring out which drive is which sounds a little dicey.

I'm not sure what you're saying though. So you make sure you have the correct drive when you use DD in the terminal to make your bootable USB flash drive. Then you stick it in the target computer and boot up (or reboot if the USB flash drive is made in the same computer). So let's say you make the USB flash drive in the same computer. So, when am I re-checking fdisk -l again to make sure the dev naming of the usb drive hasn't changed? (And actually I foresee using the USB bootable flashdrive in a different computer and just booting up. Is there a risk to doing it that way? Would I need to be running fdisk -l again then too?)
 
Old 04-04-2016, 04:30 PM   #23
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Gregg Bell View Post
I'm always using 'pwd' to figure out where the heck I am.
Very good practice. I use this all the time. Even the pros do this all the time.
 
Old 04-04-2016, 04:49 PM   #24
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
So you can see an example, take a look at mine.

Below you can see that under Device it has the 3 /dev/sda's. In my case, on this particular computer, my hard drive is /dev/sda. The sda1, sda2, and sda5 are partitions that divide the hard drive. But the drive as a whole is called sda, or /dev/sda using the whole path.
Code:
root@mycomputer:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x3636cf13

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 937195519 937193472 446.9G 83 Linux
/dev/sda2       937197566 976771071  39573506  18.9G  5 Extended
/dev/sda5       937197568 976771071  39573504  18.9G 82 Linux swap / Solaris

Now, if i stick a USB drive in and re-run fdisk -l, I can tell which is my USB drive because its the new one that wasn't there before. At the bottom of the code below, you will see /dev/sdb1. So my flash drive here is /dev/sdb. sdb is the whole flash drive and sdb1 is a partition on the flash drive.
Code:
root@mycomputer:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x3636cf13

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 937195519 937193472 446.9G 83 Linux
/dev/sda2       937197566 976771071  39573506  18.9G  5 Extended
/dev/sda5       937197568 976771071  39573504  18.9G 82 Linux swap / Solaris

Disk /dev/sdb: 7.5 GiB, 8023703552 bytes, 15671296 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: 0x5f3728a2

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *       64 2493567 2493504  1.2G 17 Hidden HPFS/NTFS
Here's some more info.
http://unix.stackexchange.com/questi...sda1-sda2-sda5

Last edited by erik2282; 04-04-2016 at 04:52 PM.
 
Old 04-04-2016, 08:55 PM   #25
Gregg Bell
Senior Member
 
Registered: Mar 2014
Location: Illinois
Distribution: Xubuntu
Posts: 2,034

Original Poster
Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by erik2282 View Post
So you can see an example, take a look at mine.

Below you can see that under Device it has the 3 /dev/sda's. In my case, on this particular computer, my hard drive is /dev/sda. The sda1, sda2, and sda5 are partitions that divide the hard drive. But the drive as a whole is called sda, or /dev/sda using the whole path.
Code:
root@mycomputer:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x3636cf13

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 937195519 937193472 446.9G 83 Linux
/dev/sda2       937197566 976771071  39573506  18.9G  5 Extended
/dev/sda5       937197568 976771071  39573504  18.9G 82 Linux swap / Solaris

Now, if i stick a USB drive in
Did you mean to say "Now, if i stick another USB drive in...?

Quote:
Originally Posted by erik2282 View Post

and re-run fdisk -l, I can tell which is my USB drive because its the new one that wasn't there before. At the bottom of the code below, you will see /dev/sdb1. So my flash drive here is /dev/sdb. sdb is the whole flash drive and sdb1 is a partition on the flash drive.
Code:
root@mycomputer:~# fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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: 0x3636cf13

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 937195519 937193472 446.9G 83 Linux
/dev/sda2       937197566 976771071  39573506  18.9G  5 Extended
/dev/sda5       937197568 976771071  39573504  18.9G 82 Linux swap / Solaris

Disk /dev/sdb: 7.5 GiB, 8023703552 bytes, 15671296 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: 0x5f3728a2

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *       64 2493567 2493504  1.2G 17 Hidden HPFS/NTFS
Here's some more info.
http://unix.stackexchange.com/questi...sda1-sda2-sda5
Thanks a lot, Eric. What I'm wondering is, Is the potential confusion having two USB flash drives in there at the same time and getting them confused? Because it seems to me there's no possibility of confusion in your first example because of the USB flash drive being so much smaller than the other two drives. (That's why I asked if you meant 'another' usb drive.)

I was testing things. I did the f disk -l thing and then abandoned it. Then I came back to try to follow your example (and I just left the USB flash drive in there all along) and lo and behold my results looked similar to yours.
Code:
fun@fun-OptiPlex-170L:~$ sudo su
[sudo] password for fun: 
root@fun-OptiPlex-170L:/home/fun# cd ..
root@fun-OptiPlex-170L:/home# cd ..
root@fun-OptiPlex-170L:/# pwd
/
root@fun-OptiPlex-170L:/# fdisk -l

Disk /dev/sda: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders, total 78125000 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
Disk identifier: 0x00040bb1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    75769855    37883904   83  Linux
/dev/sda2        75771902    78123007     1175553    5  Extended
/dev/sda5        75771904    78123007     1175552   82  Linux swap / Solaris

Disk /dev/sdb: 7748 MB, 7748222976 bytes
247 heads, 9 sectors/track, 6807 cylinders, total 15133248 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
Disk identifier: 0xe4c3ce52

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048    15132671     7565312    b  W95 FAT32
root@fun-OptiPlex-170L:/#
So is the lesson here to always check the status of the USB flash drive before doing the DD operation? For instance, if I'd've been in a hurry (in my example) I could've had my USB drive in the command as "sda" instead of "sdb." But really, even if that were the case, what would that do that would be so terrible?
 
Old 04-04-2016, 09:08 PM   #26
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
After I DD an iso to a usb I will usually reboot my laptop and make sure the usb will boot before usinig the usb on another computer. if the usb doesn't boot or there is something about the iso that is on the usb I don't like, I usually just reboot dd a different iso and check again. I've been doing this for serveral years on this laptop without incident. About two months ago I was checking out some distos, loaded the usb reboot check out the iso, reboot loaded another iso. That is when the fun began. On the reboot the usb became sda and my harddrive became sdb. The next thing I realize is the usb light isn't blinking like it normally does and the hard drive light is blinking away. Thank goodness it only acutually wrote over the first part of my harddrive where windows was installed. I was able to salavage the windows recovery partition and the linux partitions using testdisk.
 
Old 04-04-2016, 09:40 PM   #27
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
For instance, if I'd've been in a hurry (in my example) I could've had my USB drive in the command as "sda" instead of "sdb." But really, even if that were the case, what would that do that would be so terrible?
From the fdisk output you posted above, it shows a 40GB hard drive as sda and an 8GB flash drive as sdb. If you had used the dd command to create a bootable iso and written it to sda (40GB) drive, it would have completely destroyed and overwritten everything on the 40GB drive. Although it might be possible to recover some of the data on that drive, for a new user it would be extremely problematic.
 
Old 04-04-2016, 10:33 PM   #28
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by Gregg Bell View Post
Did you mean to say "Now, if i stick another USB drive in...?
No. Im only talking about one USB drive. The dd will copy from source to destination, block by block. In my example I copied a .iso file that was in my Downloads folder in sda to the usb drive, sdb.

Quote:
Originally Posted by Gregg Bell View Post
Is the potential confusion having two USB flash drives in there at the same time and getting them confused?
If you had more than one usb drive then yes, that would be a potential confusion. But if you only have one usb drive then you can get confused by putting sda where sdb should be, or sdc, sdd, or however many drives you have mounted.


Below, if I'd done this:
Code:
root@myserver:~# dd if=/home/erik/Downloads/debian-live-8.3.0-amd64-kde-desktop.iso of=/dev/sda oflag=direct bs=1048576
Then my primary hard drive (sda) would have been overwritten and unusable. Then I'd have to reinstall my OS and have complete data loss, unless of course you have backups.

source and destination is like this:
dd if=source/of/iso of=/destinantion/of/media

if you wanted to clone a usb to usb, then, for example:
Code:
dd if=/dev/sdb of=/dev/sdc bs=32M
this would make a block by block copy from sbd to sdc. sdc would be exactly like sdb. and just to reiterate, those are examples. Always triple check that you are using the correct path when using dd.

If you want to do this I'd suggest practicing on a computer that, in case you mess up, its no big deal to reinstall. Please don't test on your running system and risk losing data for the sake of practicing the dd command. For now use the GUI tools and if you have another machine, test/play on that one. my two cents.

Last edited by erik2282; 04-04-2016 at 10:49 PM.
 
Old 04-05-2016, 06:10 AM   #29
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Gregg,

A full installation onto a flash drive is a 2-step, 2-flash drive process. You need a small flash drive (looks like at least 2GB for Xubuntu) for the bootable iso image, and a larger flash drive (realistically 8 GB or larger; I've installed Lubuntu on a 4GB drive, but it was tight)
Step 1: Make a bootable iso image, just as you normally would on the small flash drive. Don't worry about persistence - it doesn't matter here one way or the other.
Step 2: Boot from the small flash drive, plug in the larger flash drive, and select the Install icon. Select the large flash drive (rather than your system's internal hard drive) as the installation target and install as you otherwise normally would. Make sure you install the bootloader to the larger flash drive
Step 3: The installation is done - there is no step 3. You should now have a bootable, full installation of your favorite distro on the large flash drive.
 
2 members found this post helpful.
Old 04-05-2016, 06:22 AM   #30
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 829

Rep: Reputation: 229Reputation: 229Reputation: 229
Greg, I just reread all your posts after reading rockdoctor's post. I didnt realize you wanted an actual install, not live image, on a flash drive. Sorry about that. Anyway, my steps are correct to make the bootable USB, but then follow RockDoctor's steps to boot to it and install on the other drive.

Last edited by erik2282; 04-05-2016 at 06:23 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help making a bootable USB flash drive from a bootable CD. Gregg Bell Linux - Software 8 01-06-2016 01:38 PM
How access other files in a bootable linux usb flashdrive? archieval Linux - Newbie 3 06-08-2011 02:30 AM
Trouble making USB / flashdrive installation Vhal Red Hat 2 11-16-2010 12:10 PM
[SOLVED] burn bootable cd from bootable flashdrive bluegospel Slackware 2 04-03-2010 01:24 PM
Making a USB stick bootable from a bootable cdrom cwwilson721 Slackware 2 10-23-2009 09:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration