How to Install Oracle Linux from a USB Stick

source

If you want to install Oracle Linux from a USB drive, keep in mind that not all hardware supports USB device booting. Also, during the boot process you may have to instruct your BIOS to boot from that specific USB device. Finally, keep in mind that this method of installation is not officially sanctioned by Oracle support. You'll need an Oracle Linux 6.0 or higher system to produce the key. Earlier versions may work, but additional prerequisites may be required. The examples in this article assume a USB key device name of /dev/sdb1. Be sure to verify the device name of your USB key to avoid accident data loss.

Prerequisites

  1. The first thing you will need is an ISO image of Oracle Linux. The quickest way to obtain an ISO image is from the Oracle Software Delivery Cloud
  2. You will need a desktop or server system running Oracle Linux in order to prepare your USB drive.
  3. You will also need to download this script to create the bootable USB drive.
  4. Your Oracle Linux system will also need the package syslinux installed. You can install syslinux using yum with the following command:
  5. yum install syslinux

Marking Partition One as Bootable

Once your prerequisites are in order, you need to designate partition one as bootable. Use the parted application, as in this example:

[root@host]# parted /dev/sdb 
GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) toggle 1 boot
(parted) quit
Information: You may need to update /etc/fstab.

The example above uses a USB key labelled /dev/sdb. The parted application will only accept device files without partition numbers. So, if we had selected /dev/sdb1 instead, we would have gotten an error message when we tried to write the changes to disk.

Creating the USB Key

Now you can start creating USB key via the script that you downloaded earlier. The script accepts two paths: first the source ISO file and then the USB key:

[root@host]# sh Install_OL_fromUSBStick_Script --reset-mbr /home/user/OL6.3.iso /dev/sdb1 
Verifying image...
livecd-iso-to-disk.sh: line 527: checkisomd5: command not found Are you SURE you want to continue?
Press Enter to continue or ctrl-c to abort
Size of DVD image: 2957
Size of images/install.img: 132
Available space: 31186
Copying DVD image to USB stick
install.img
    137834496 100%   10.87MB/s    0:00:12 (xfer#1, to-check=0/1)
sent 137851396 bytes  received 31 bytes  11028114.16 bytes/sec total size is 137834496  speedup is 1.00
sent 37 bytes  received 12 bytes  98.00 bytes/sec total size is 3100217344  speedup is 63269741.71 Updating boot config file Installing boot loader USB stick set up as live image!

Once the script is finished running you have a bootable USB drive that can install Oracle Linux. While booting, pay attention to your BIOS boot screens as they will often provide direction on how to select a specific boot device other than the ones in the standard boot sequence. For some older systems you may need to go directly into the BIOS setup utility to specify the USB device in your boot sequence. Once you have booted successfully off of your USB device and the installer starts installation will proceed just like an installation from regular DVD media.

- Robert Chase

Website Newsletter Facebook Twitter
Comments:

script wouldn't work under OEL 5.6/5.8 because:
extlinux -i not supported
udevadm command not available

also it would be helpfull to explain how to prepare the USB stick because script expects an ext2 filesystem on the stick

Regards

Edmund

Posted by guest on April 25, 2013 at 08:23 AM MDT #

Very helpful, thank you!

Posted by guest on April 29, 2013 at 12:11 AM MDT #

The script you link to does not have the same name as the script mentioned in the body of the blog entry, which is a little confusing initially and adds work for whoever is trying this out.

Also this script appears to be an older/modified version of the script found in the livecd-tools package. Installing the package will install any dependencies such as extlinux whereas running just the script means you have to discover things by trial and error. This can be frustrating if you see "command not found" after the script has been running for a long time.

It's also a little disingenuous to self-host a script without providing any attribution.

Posted by guest on August 06, 2013 at 04:15 AM MDT #

Thanks, guest, for the correction. Looking into it ... will get back to you.

Rick

Posted by guest on August 06, 2013 at 08:53 AM MDT #

Thanks for your comments. We will be updating this article shortly to address several of the issues mentioned in the comments.

Robert Chase

Posted by guest on August 16, 2013 at 10:21 AM MDT #

It worked, thanks a lot!
In addition, i was running the installation using a kickstart file, now my installation can be ran automatically with the least human interaction! :)

Posted by guest on November 28, 2013 at 02:24 AM MST #

Somewhat ironic to have to install Oracle LInux so I can prepare a USB drive to install Oracle Linux. I'm pretty sure this means I can't install Oracle Linux, unless you know better...

Posted by guest on December 17, 2013 at 08:04 AM MST #

This does not work. Here is what it says when I run the script.

readlink: unrecognized option '--reset-mbr'
Try `readlink --help' for more information.
Missing source

Posted by guest on January 09, 2014 at 08:20 AM MST #

>Somewhat ironic to have to install Oracle LInux so I can prepare a USB drive to install Oracle Linux.

Download Oracle VM Virtualbox. It is available for Windows and different linux distributions. Create a virtual machine. Install Oracle linux on that one. (It is possible mounting the iso image.) Follow the instructions above. Have a USB stick of 8 GB or more, 4 GB won't be enough. The whole process may need several hours.

And don't be surprised: the Oracle linux has no GUI. You have to do everything from command line.

Posted by atzs on January 24, 2014 at 08:29 AM MST #

It would be probably worth to mention 3 things before running this script.

a) after creating 1st partition on your USB device, format it with vfat, ext2 or ext3 filesystem.
b) before running script, make sure nothing is mounted under /media
c) The full command to run script would be similar to:

sh Install_OL_fromUSBStick_Script --reset-mbr /home/user/OL6.3.iso /dev/sdb1

THis assumes that /dev/sdb1 is your USB device

Posted by guest on March 04, 2014 at 07:13 AM MST #

Thank you for the great feedback here! I'm going to be making some changes to the article in a moment here to assist in it's clarity. I am looking into some alternate ways of creating bootable USB keys for Oracle Linux and may be updating this article soon with some other options.

The script will take care of the file system by itself. It does not matter to the script what's currently on the key.

For the person that had the "readlink: unrecognized option '--reset-mbr'" error. Could I get some more information about your system? Is it Oracle Linux 6?

Posted by Robert Chase on March 07, 2014 at 04:06 PM MST #

I can't see my post so I apologize if I'm double-posting. Wasn't intended

Well... you CAN follow the above steps OR you can cheat:
You need:
1x 8 GB Flashdrive
1x Ubuntu-Live iso
1x Oracle install iso
1x VirtualBox for Ubuntu

Procedure:
1. Create an Ubuntu live install USB with approx 200 MB of space to keep data.
2. Copy the Oracle install ISO onto the flashdrive
[ OPTIONAL ]
Copy the Virtualbox .deb package onto the USB
3. Boot up the Live distro on the target machine
4. Install VirtualBox, either from the package you saved to the flashdrive or download it and install via internet [ it's not a standard part of Ubuntu Live distro repos, so it's faster to already have it on the usb-drive ]

5. Once VirtualBox is installed:
Open terminal and run this command
" VBoxManage internalcommands createrawvmdk -filename <~/VMachines/>mydrive.vmdk -rawdisk <PhysicalDrive e.g.: /dev/sda> "

The command above creates a VMDK file that points to the selected HDD as a virtual hard drive

6. "sudo VirtualBox"

7. Create a new virtual machine, select "Use an existing virtual hdd" and select the VMDK which was created in step (5) . All other settings depend on your taste and HW

8. Launch the newly created VM, connect the oracle installation ISO to the VM and follow Installation instructions. I had to restart the VM from the menu for the ISO to boot up.

... and voi la! :) Works like a charm.

P.S.: I came up with this process because I spent over a week solving one problem after another and finally I arrived at HW problems, to be more precise: The server only had a CD-ROM drive and wouldn't accept any DVD-Combo replacements for some reason. Since I was fed up, I decided to cheat ^_^ I hope this helps someone :)

Posted by guest on May 26, 2014 at 07:37 AM MDT #

Hello,

I have just wrote the V46550-01.iso (548 MB) containing Oracle VM Server 3.3.1 x64 to my 2GB pendrive and successfully booted up on old HP Proliant DL140 G3 but after selecting several common options the installer reports that there is no CD-ROM with content available and requests to insert the CD-ROM. :-(

Does anybody have any clue how to install Oracle VM Server 3.3.1 from USB stick?

Appreciate any related comments.

--
Regards,
P4.

Posted by P4 on November 24, 2014 at 04:44 PM MST #

Hi ,

When tried exactly the same with the steps provided, I got an error message stating that "USB Filesystem must be vfat, ext[23]"

Since I used an existing File system formatted in Windows using ISOTOUSB, which did not work.

Ofcourse the Partition Type was Win95 VFAT, but error was thrown as above.

Resoltion:
mkfs.vfat /dev/<path to the usb device>

Then executed the parted /dev/<path to the usb device>

toggle 1 boot
quit

It Worked.

What Oracle cannot provide a clean way to install from USB from the URL(https://docs.oracle.com/cd/E52668_01/E54695/html/ol7-install-media.html#ol7-install-media-usb) , your script made to work.,

Posted by Kasi on December 24, 2014 at 05:35 AM MST #

Thanks!!!! Works nice onto HP Proliant DL380p Gen8.
Once again, thanks a lot!!

Posted by Jose on January 29, 2015 at 09:40 AM MST #

Kasi, most probably your answering comment is a correct resolution to my problem of missing source media by the installer. I did not pay attention on USB filesystem used during the preparation on Windows. I wrote the ISO onto USB stick with UltraISO which most probably chose NTFS instead of vfat.

Unfortunately I did not spend too much time on troubleshooting and chose XenProject on Debian host for dom0 because I was not really decided on the hypervisor. Xen seem to be more straightforward and correct me if I'm wrong but it doesn't require so many system resources as Oracle. I assumed that only by the size of installation ISOs.

The purpose of my setup is just to play a bit with different hypervisors so probably sooner or later I will be checking Oracle Linux as well.

Thanks for the helpful comment and sorry for answering so late.

--
Regards,
P4.

Posted by P4 on January 29, 2015 at 10:14 AM MST #

A technical comment to Rick (thanks for fast approval) and other OTN Garage blog maintainers.

Not sure whether it is done purposely or not but URL field escape function in the comment input area is not aware about http/https prefix that people may insert in their website links. Not a big deal but fixing could be annoying specifically with option "Remember Information?" checked. See my previous comments for reference, I am pretty sure that I corrected my second comment but most forgot to correct after previewing the post and apparently it got unfixed back. :P

Now posting without previewing the message with corrected (no https prefix) URL.

--
Regards,
P4

Posted by P4 on January 29, 2015 at 11:09 AM MST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Contributors:
Rick Ramsey
Kemer Thomson
and members of the OTN community

Search

Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today
Blogs We Like