LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-20-2013, 07:17 AM   #1
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Rep: Reputation: 3
Making a USB Drive Bootable to Install CentOS


I have read one article after another, each claiming to be the way. LOL. I'd like to settle for just one. I have several older servers that have Teac CD-224E IDE CD-ROMs that some sites say also read DVD. I'm confused and my normal Admin is on vacation. So... time to learn something new

I have a small hosting company and the servers are still excellent but the drive to the co-lo is over an hour. I'd like to be prepared to install CentOS one way or another. I wonder if someone could help me make a USB drive bootable and install Centos 6.4? I'd appreciate it.

These are the instructions that I have so far. All of my servers have 3Ware 9550SXU-4LP RAID controllers, so /SDA1 and /SDA3 are the hard drives:

Code:
	
This is not pratical

I followed this instructions:
http://lists.centos.org/pipermail/centos/2012-January/122140.html
>From blank USB stick to bootable install:

yum install livecd-tools syslinux
dd if=/dev/zero of=/dev/sdb bs=512 count=1000
parted /dev/sdb mklabel msdos
parted /dev/sdb mkpartfs p ext2 0% 100%
tune2fs -m0 /dev/sdb1

parted /dev/sdb toggle 1 boot
umount /dev/sdb1
livecd-iso-to-disk <path to>/DVD.iso /dev/sdb1

mkdir /mnt/iso
mount -o loop <path to>/DVD.iso /mnt/iso
mkdir /media/<usb stick>/images
cp /mnt/iso/images/install.img /media/<usb stick>/images/
cp <path to>/DVD.iso /media/<usb stick>/
 
Old 10-20-2013, 07:49 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
You could use Unetbootin to create a bootable USB stick from the downloaded .iso file:
http://sourceforge.net/projects/unetbootin/
Unetbootin is available from the repositories for some Linux distributions so you can install it from the "software center" or similar. For Windows you can just download Unetbootin and run it.
There are other ways of doing it but I find this the most straight forward.
 
Old 10-20-2013, 03:11 PM   #3
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
Thank you for your reply!

This just makes the thumb drive bootable? But then how do I make it autoplay the installer for CentOS 6.4? It is supposedly on DVD1 and is a ISO.
 
Old 10-20-2013, 03:21 PM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by krazybob View Post
Thank you for your reply!

This just makes the thumb drive bootable? But then how do I make it autoplay the installer for CentOS 6.4? It is supposedly on DVD1 and is a ISO.
No, instead of burning the .iso file to a DVD or CD you use Unetbootin to put it onto a USB stick and boot from the USB stick then use the installer as you would if it were on a DVD or CD. You might need to go into BIOS and make your computer boot from USB but that is usually pretty straightforward if not always intuitive.
 
Old 10-20-2013, 03:53 PM   #5
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
That's what I thought. I will have to go into the BIOS and make the USB boot first. I'll also have to figure out what program to execute but if I remember correctly it is in the auto-play config file.
 
Old 10-20-2013, 04:13 PM   #6
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
No, there is no program you have to execute. You boot from the USB drive into either a live Linux system or and installer and then install Linux to a partition on your hard drive. This isn't a program installer you run under Windows to install a need application it is a separate operating system entirely. You follow pretty much the same process you would to install Windows on a machine without an OS installed.
 
Old 10-20-2013, 08:35 PM   #7
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
I apologize if I have written something that hasn't been completely clear. A appreciate the time you have taken to answer.

This isn't how the CentOS 6.4 installer works. Since I don't know if the Teac CD-244e CD-ROM is really a DVD reader as well (based on the quote I received before I bought the servers) I have been doing a Netinstall. This is where a bootable CD launches an installer on the CD that partitions and formats the hard drive for RAID 1 operation. One then enters the path to a FTP or HTTP source where the Linux files are located. The bootable CD is created by dumping an ISO to the CD-R.

The installer copies the files to the new server and makes it bootable. I've looked at the CD-R and I don't see anything obvious and assume that there is a hidden file(s) somewhere.

CentOS 6 has gotten so large that the only way to efficiently install all of the files is to use a DVD drive. All of the DVD drives that I have come across (new ones) are SATA and the motherboard in my servers don't have SATA connectors. They are made available by the 3Ware 9550SXU card. I only know how to use the Teac as a CD-ROM. Is there something that I need to do to tell it to boot as a DVD drive or is it automatic? Like a mount command? Back in earlier times installation was done using a multi-volume

This means at this point that my option is to dump an ISO to a CD-ROM and do a time consuming net install unless I can create a bootable USB drive that appears just like a bootable CD-ROM.


Code:

[TXT]	0_README.txt	05-Apr-2013 07:09 	1.4K	 
[ ]	CentOS-6.4-x86_64-bin-DVD1.iso	05-Mar-2013 13:44 	4.1G	 
[ ]	CentOS-6.4-x86_64-bin-DVD1to2.torrent	08-Mar-2013 16:15 	217K	 
[ ]	CentOS-6.4-x86_64-bin-DVD2.iso	05-Mar-2013 13:44 	1.4G	 
[ ]	CentOS-6.4-x86_64-LiveCD.iso	23-Apr-2013 08:59 	702M	 
[ ]	CentOS-6.4-x86_64-LiveCD.torrent	22-May-2013 12:54 	28K	 
[ ]	CentOS-6.4-x86_64-LiveDVD.iso	23-Apr-2013 09:03 	1.7G	 
[ ]	CentOS-6.4-x86_64-LiveDVD.torrent	22-May-2013 12:54 	68K	 
[ ]	CentOS-6.4-x86_64-minimal.iso	05-Mar-2013 13:45 	342M	 
[ ]	CentOS-6.4-x86_64-netinstall.iso	04-Mar-2013 20:05 	230M
 
Old 10-20-2013, 09:55 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
i would use
"CentOS-6.4-x86_64-LiveCD.iso"
and dd to put it on the usb
-- format the usb to ext4 ( gparted)
Code:
 cd to/the/location/you/saved /the /iso/to

dd if=CentOS-6.4-x86_64-LiveCD.iso of /dev/sdg1 bs=512k
where /dev/sdg1 is replaced with YOUR drive

or a better option for a headless server is to use the
"CentOS-6.4-x86_64-minimal.iso"
image
 
Old 10-21-2013, 04:49 AM   #9
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
Thank you John. But does this make the USB bootable? When all is said and done Virtuozzo 4.7 will be going on the server, but Parallels cannot define what a "minimal" installation is.
 
Old 10-21-2013, 04:53 AM   #10
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
One more thing. I don't know how to format the USB as ext4 or anything else for that matter. And does this make it bootable and autoplay like the CD's?
 
Old 10-21-2013, 12:28 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
the bootable is set in your bios
as stated a few posts above

set it to boot from the usb
Quote:
One more thing. I don't know how to format the USB as ext4
use Gparted as you would use for any other drive !!!

Last edited by John VV; 10-21-2013 at 12:30 PM.
 
Old 10-21-2013, 07:39 PM   #12
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Wait. If you dd the iso to the usb you won't need to prep it at all.

I assume that Centos is a hybrid iso and can be copied to a flash drive to make it act exactly (should) like a normal cd/dvd just way faster.

Yes, it should be bootable if your system is newish.
 
Old 10-21-2013, 11:27 PM   #13
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
CentOS ISO's in fact create a bootable CD or DVD. But I have never done this to a USB drive and I have never used gparted. I know that I have to switch the BIOS to tell it to boot from the USB but the USB has to first be bootable as a device. I simnply said that I don't know how to format in ext4. All formatting has been done by CentOS during its creation stage. I then load Virtuozzo 4.7 and then Plesk 11.x.

So now that we have come full circle -- how do I prep the USB drive to accept a Linux ISO that contains code that if it were a CD it would be bootable?
 
Old 10-21-2013, 11:52 PM   #14
krazybob
Member
 
Registered: Oct 2009
Location: Los Angeles, CA
Distribution: Centos 5.x
Posts: 133

Original Poster
Rep: Reputation: 3
There seems to be a fundamental misunderstanding here. Just like I am sure with every other Distro when the ISO is extracted to the CD or DVD it creates a bootable media. My issue is not being able to switch in the BIOS to USB to select what hardware I boot from. That's a completely rookie thing and humbly I'm not a rookie. I just don't know how to make a USB stick bootable. Do I waste $20 and extract an ISO from CentOS and see if it works and creates a bootable USB drive? Or are there certain steps necessary for a USB drive that are not necessary for CD or DVD drives. Or do I use something like unetbootin-windows-585 to prep the USB drive first.

Hopefully this clears up my issue. I appreciate you trying so hard to help me.

Thank you all in advance for trying to help. Hopefully the next guy with the same question will find these answers and we will all have given back to the community.
 
Old 10-22-2013, 12:57 AM   #15
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
well if you want to go to the extra trouble
-- add the boot flag to it , but note it is ignored by new hardware and some older

reboot with the USB thumb drive plugged in AND the Gparted live CD in the cd tray

and use gparted to set the boot flag on the partition that the ISO will be on
-- mind you i normally dd a live iso and make a "persistent" partition ( on an encrypted drive -- Kali 1.0 to 1.5 )

dd will put the iso on the drive in the format the iso IS

k3b also should be able to "burn" the iso to a usb AS A CD ( though i have not tried that )
 
  


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
Making a bootable USB drive for linux thijs95 Linux - Newbie 9 07-18-2012 04:21 PM
Making bootable USB flash drive to install Linux tron_thomas Linux - General 35 07-11-2011 11:19 PM
How to make USB Flash drive bootable in Centos sols2008 Linux - Server 3 09-09-2010 12:48 PM
making a WD My Book external USB drive bootable gregmcavoy Debian 1 01-03-2008 09:12 PM
Making a usb card(pen drive) bootable with damn small linux Digital Surgeon DamnSmallLinux 2 01-05-2007 07:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:56 AM.

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