LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Making a USB Drive Bootable to Install CentOS (https://www.linuxquestions.org/questions/linux-server-73/making-a-usb-drive-bootable-to-install-centos-4175481488/)

krazybob 10-20-2013 07:17 AM

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>/


273 10-20-2013 07:49 AM

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.

krazybob 10-20-2013 03:11 PM

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.

273 10-20-2013 03:21 PM

Quote:

Originally Posted by krazybob (Post 5049244)
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.

krazybob 10-20-2013 03:53 PM

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.

273 10-20-2013 04:13 PM

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.

krazybob 10-20-2013 08:35 PM

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


John VV 10-20-2013 09:55 PM

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

krazybob 10-21-2013 04:49 AM

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.

krazybob 10-21-2013 04:53 AM

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?

John VV 10-21-2013 12:28 PM

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 !!!

jefro 10-21-2013 07:39 PM

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.

krazybob 10-21-2013 11:27 PM

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?

krazybob 10-21-2013 11:52 PM

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.

John VV 10-22-2013 12:57 AM

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 )


All times are GMT -5. The time now is 12:11 PM.