[How To]Boot from a USB drive without BIOS support


Recommended Posts

Since it seemed to be such a common issue with barely any resources available, I decided to write a tutorial on how to achieve booting Linux, from an external USB drive, on a computer that can't boot from USB (Using a boot CD). I'll get right to the point.

I used Windows for the CD burning steps just because it was easier for me, but feel free to use linux.

1. Start off by installing the distro of your choice to the USB drive. For the rest of the tutorial I'm going to be using Mandrake 10.1 just becuase I've already made the initrd for it. All the defualt settings should be fine.

2. Using a rescue/LiveCD, mount your USB drive and steal the kernel off it (from /boot). Copy the kernel to somewhere that you can access from Windows, like a NTFS/FAT partition on the disk.

3. Here comes the fun part. If you plan on installing Mandrake 10.1 (I've found it to be pretty nice), you can just use my initrd file, which will save you A LOT of time. If you plan to use a distro, hop over to my section on editing my initrd to fit your system.

4. Now, from Windows, proceed to create your CD bootloader. I've convienently made an isolinux boot cd, so all you have to do is insert your kernel. Use MagicIso or a similar program to put your kernel and initrd.img into the isolinux directory on the cd. Check the isolinux.cfg and make sure it's pointing to the kernel and initrd, and that root is set to /dev/sda1.

5. Burn your Boot CD. I've been looking for buisness card cd's so I could put my bootloader in my wallet, but none of the major retail stores have them. Tell me if you find a good deal on them somewhere.

6. This is the first test. Put in the boot CD, and plug in the USB drive. The system should boot up and get to the startup script, and it'll probably get hung at the fsck step (At least for Mandrake 10.1). If you didn't get that far, you have a problem with the bootloader on the cd, the kernel, or the initrd. Fix it, or if you can't figure out what's wrong, contact me.

7. If you made it this far, you're pretty much done, and you can smile now. Just use a rescue/live cd and mount your usb drive again. Delete/modify the lines in your rc script that the boot is getting stuck at. Keep trying to boot/fixing the script until it's happy and you can boot.

8. That's it! You're done. Hope this guide helped you. If there are any bugs/errors/you can't figure it out, PLEASE contact me so I can change it.

Initrd Editing:

So, you chose to use a different disto. That's fine and all, but it's going to require some work.

Basically, here are the steps.

Boot using a rescue/live cd. Mount your usb drive. Also, mount the directory containing my initrd image (Have it on a cd or something). Gunzip the initrd.img (rename it to initrd.gz first) if it needs it. Mkdir /mnt/initrd Then mount it using mount -o loop initrd /mnt/initrd.

From /mnt/initrd, view the linuxrc file and get a feel for what it's doing. Then, replace all of the modules currently in the initrd (The Mandrake 10.1 modules) with the modules from the usb drive, the system you wish to boot from usb.

Unmount the initrd image, gzip it back up, rename it to initrd.img, and copy it back to a Windows accessable partition.

Continue on with the rest of the steps.

usbboot.zip

initrd.zip

Edited by zachman123
5.  Burn your Boot CD.  I've been looking for buisness card cd's  so I could put my bootloader in my wallet, but none of the major retail stores have them.  Tell me if you find a good deal on them somewhere.

585264239[/snapback]

thank you!!!! this is SO cool!!!! i'm gonna try it soon (i hope!).

anyhoo...you might try supermediastore for your business card cds. i've ordered stuff from them before and they seem to be ok. i'd swear that i saw the cds in compusa but can't find anything about them on the site.

  • 2 weeks later...

Not better...

For both files:

With Winzip : "File is not in the standard Zip 2.0 format"

With 7-Zip : file broken

With unzip under Linux : error uncompressing

Inspite of these errors, I get some files:

usbboot.iso :120 KO

initrd.img : 129KO

but when I try to open them under MapgicIso, it tells me that these files don't contain image...

Files Fixed.

Stuffit apparently hates me, it wouldn't zip files correctly AND it didn't give an error trying to unzip the old files (but they were still messed up)

Anyways Winzip did the trick, and I may be reinstalling/killing stuffit soon.

If you have ANY problems AT ALL, please let me know. Feel free to

E-mail [email protected]

AIM zachman123

MSN [email protected] **Not on often

YAHOO [email protected] **Not on often

Hi again, indeed your files are fixed. Unfortunatly, I can't boot yet. What I did:

Using winimage:

- I opened the usbboot.iso file and I found an isolinux dir.

- I put my MDK 10.1 vmlinuz-2.6.8.1-12mdk-i586-up-1GB from my USB install /boot to isolinux directory

- I put the initrd.img file in the isolinux directory as well

- I edited initrd.cfg file :

*********************

default linux

timeout 0

label linux

kernel vmlinuz-2.6.8.1-12mdk-i586-up-1GB

append initrd=initrd.img root=/dev/sda1

*********************

- I burned the image and tried to boot : my bios can't boot it. I have none message.

Questions:

- Do I have to leave "vmlinuz' in initrd.cfg file?

- Is it realated with lilo.conf of USB drive ?

- I have 2 installs : one one sda1 and another one sda3. Should it work I have set root=/dev/sda3 in initrd.cfg ?

thanks again.

You mean the CD won't boot? Make sure winimage is keeping it as a bootable CD, to test that try burning my exact iso just to see if that'll boot.

And I assume you mean isolinux.cfg, everything in there looks fine. root just needs to point to the root partition of your linux install...

Yes, it won't boot at all, I just have the BIOS message 'Boot from CD:', the CD is read for 5 secs and then, nothing...

I tried to brun the usbboot.iso : it boots and tell me it can't find the vmlinuz kernel (normal). So it should be your initrd.img that freeze the boot? I use an external USB CD Reader.

Questions:

- Do I have to set kernel to kernel (link) or the full kernel name ?

- Why don't your provide a full iso pour sda1 with provided kernel ?

Thanks.

Yea, it must be your editing of the iso messing up it's burnable-ness.

I'll put them together and test it and post it, I'll put it up in a few min.

Neowin wouldn't upload it (it's 9 megs), and my website has (very) limited bandwidth so I can't upload it there.

Can anyone host it if I email it to them? Or if you want the file just email me ([email protected])

Nervermind, I finally found another solution:

Book your MDK using your rescue disk (F1, then 'rescue').

mkdir sda1

mount /dev/sda1 sda1

chroot sda1

then, use the mkrescue command:

mkrescue --iso

that will geenrate a rescue.iso file.

Burn this image, boot on USB CDROM, that's all. It works for me for sda3.

Oh yea, that would work too :D

Forgot mkrescue would take any modifications you made to the rescue system. Much easier, thanx for the tip. Some distros might not support something like that, so if you're trying some odd system, my instructions should help.

All that time I wasted... Nice solution tho, I was to lazy to make my own firewire initrd with my method, but I think I'll try it with yours.

  • 1 month later...
Oh yea, that would work too :D

Forgot mkrescue would take any modifications you made to the rescue system.  Much easier, thanx for the tip.  Some distros might not support something like that, so if you're trying some odd system, my instructions should help.

All that time I wasted... Nice solution tho, I was to lazy to make my own firewire initrd with my method, but I think I'll try it with yours.

585350512[/snapback]

It didn't work for me! :no:

I tried the mkrescue --iso script on MDK 10.2beta3 (that I installed on sda1) and booted on the CD but I've only seen L 99 99 99 ... on the screen, nothing more !

Then use my method. Try using my iso files, but if that doesn't work, do it from scratch like I did.

I'm no linux expert by any means, so someone else shouldn't have too much trouble with my steps...

edit: Just saw you're using 10.2beta3 ... Which is a different kernel than my iso. So you'll have to do my method from scratch.

Then use my method.  Try using my iso files, but if that doesn't work, do it from scratch like I did.

I'm no linux expert by any means, so someone else shouldn't have too much trouble with my steps...

edit:  Just saw you're using 10.2beta3 ... Which is a different kernel than my iso.  So you'll have to do my method from scratch.

585559086[/snapback]

in fact I think I'm trying something simpler : installing 10.1 on my USB drive first to test your CD and then I will try MDK10.2!

By the way what was your version of MDK 10.1 it is normal MDK with or without last updates, 10.1 community?

one more question : the mandrake installed on the usb drive shoud or should not have a bootloader installed ?

Edited by manouchk

Doesn't matter if a bootloader is on the drive (I had it on and then deleted it by mistake) as it's not used unless you plan on using the external drive with a computer that DOES support usb booting, in which case you won't need to use the cdrom to boot.

I'm not sure what version of mdk it was (It came with PC Format awhile ago). Anyways if the kernel is different you can see in the iso (Unless I renamed it, might've).

Anyways good luck, and feel free to instant message me if you want.

here is a script to build rapidly a booting CD from scratch :

It worked for me (be prudent it writes important files)

#!/bin/sh

#needs syslinux (tested with version 1.76)

d="CD_boot"

rm -rf $d

mkdir $d

cp /usr/lib/syslinux/isolinux.bin $d

#create initrd for USB boot

mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod /boot/usbinitrd.img `uname -r`

#copy kernel (vmlinuz) and initrd file in isolinux directory

cp /boot/vmlinuz $d

cp /boot/usbinitrd.img $d/initrd.img

#create file isolinux.cfg

#assuming kernel file is in isolinux/vmlinuz

#and initrd in file isolinux/initrd.img

cfg=$d/isolinux.cfg

echo "default linux" > $cfg

echo "timeout 0" >> $cfg

echo "label linux" >> $cfg

echo " kernel vmlinuz" >> $cfg

echo " append initrd=initrd.img root=/dev/sda1" >> $cfg

mkisofs -o boot_USB.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $d

echo "burn CD :"

echo "cdrecord dev=ATAPI:0,0,0 blank=fast"

echo "cdrecord dev=ATAPI:0,0,0 boot_USB.iso"

  • 3 weeks later...

The question is only stupid if you meant using this EXACT method. Of course you're not going to run Windows using a Mandrake disk or linux bootloader... But running windows/dos is possible. If you feel lazy, check out BartPE (A limited version of windows xp that runs off a cd). You might be able to mess with it to make it use a usb disk.

Making Windows XP run from cd on your own would be very hard. Windows 9x/ME though I've managed to kind-of run, just by fooling around. Simpy use a dos bookdisk on cd along with a USB driver (that's the tricky part though...) and install on the usb disk. Then have fun making a bootloader from dos (load dos, init usb driver, then win.exe)

DOS USB resources... http://www.stefan2000.com/darkehorse/PC/DOS/Drivers/USB/

http://www.freedos.org/freedos/news/newsitem/149.html

Just search

Thanks for your prompt reply. What I am really looking for is a solution similar to your scenario where USB boot is not supported by BIOS and I need to be able to use a bootable CD to do so. As it does seem that LILO can boot DOS/Windows 98, I was guessing it might be possible to do so with an approach similar to yours if my goal is to use a CD to boot DOS/Windows 98 from an external USB HDD. Any suggestion?

  • 2 weeks later...

Didn't think about LILO being able to do that, but it should be possible to at least boot ( I don't know if windows would like it).

edit: that's what I kinda tried, except booted from DOS. Windows started, but in messed resolution and didn't work quite right.

Edited by zachman123
  • 3 weeks later...
here is a script to build rapidly a booting CD from scratch  :

It worked for me (be prudent it writes important files)

#!/bin/sh

#needs syslinux (tested with version 1.76)

d="CD_boot"

rm -rf $d

mkdir $d

cp /usr/lib/syslinux/isolinux.bin $d

#create initrd for USB boot

mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod /boot/usbinitrd.img `uname -r`

#copy kernel (vmlinuz) and initrd file in isolinux directory

cp /boot/vmlinuz $d

cp /boot/usbinitrd.img $d/initrd.img

#create file isolinux.cfg

#assuming kernel file is in isolinux/vmlinuz

#and initrd in file isolinux/initrd.img

cfg=$d/isolinux.cfg

echo "default linux" > $cfg

echo "timeout 0" >> $cfg

echo "label linux" >> $cfg

echo " kernel vmlinuz" >> $cfg

echo " append initrd=initrd.img root=/dev/sda1" >> $cfg

mkisofs -o boot_USB.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $d

echo "burn CD :"

echo "cdrecord dev=ATAPI:0,0,0 blank=fast"

echo "cdrecord dev=ATAPI:0,0,0 boot_USB.iso"

585568604[/snapback]

Your script is perfect and that is what I have done. I am posting this because my problem is related booting from usb-cdrom. This is what is happening:

I am installing Linux (Suse) from my CD (customized) on IBM blade center (BIOS is capable of booting from usb) in which cdrom is a usb device. What exactly happens is this:

During boot, it says grub loading stage 2......

and then instead of loading the menu.lst , it launches the grub shell. Now when I try to set "root ( <tab>", no cd is listed. The only devices listed are fd0 and hd0 (hard disk already has Suse Linux on it (which was installed using standard Suse CD).

This is the command I used to create ISO

mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \

-boot-load-size 4 -boot-info-table -o grub.iso

What I understand is that GRUB automatically sets the root device to (cd) when booted from a CD-ROM

Is there any option in mkisofs or grub in which we can change the default (cd) to usb-cdrom (whatever alias it has) so that stage2 could be loaded successfully.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Weekend PC Game Deals: Resident Evil, Mafia, Like a Dragon, and more by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic concluded its mystery giveaways this week with another double freebie promotion. As a part of this, you can now grab Rogue Waters and Songs of Conquest to keep. Songs of Conquest is a turn-based 4X strategy game where you'll be managing a kingdom, making tough decisions, and taking down enemy forces in tactical combat. Meanwhile, Rogue Waters is a roguelike where, as a pirate captain, you command a ship and crew through procedurally generated encounters. The double giveaway is coming to an end on June 11. On the same day, Warhammer 40K Speed Freeks will join in as the next freebie. Another Humble Choice offer was revealed earlier this week, bringing a refreshed eight-game selection to jump into. The June selection is Octopath Traveler 2, The Riftbreaker, Life is Strange: Double Exposure, INDIKA, Citizen Sleeper 2: Starward Vector, Construction Simulator, Hell Clock, and Overlooting to keep as Steam keys. The $15 bundle gives you all eight games from this month's Choice selection. The month-long promotion will come to an end on July 6, giving you ample time to decide on whether you want the titles. The Humble Store also brought in standard gaming collections this week. The IGN Live Bundle kicked things off with games like Control, Shadow Gambit: The Cursed Crew, Blair Witch, Rollerdrome, and The Last Campfire for $10. At the same time, the We Will Always be Here bundle carried in titles like Bad End Theater, Thirsty Suitors, Vampire Therapist, and Tavern Talk for $12. Next, the 2K Sports Champions Bundle comes touting games like NBA 2K26, PGA TOUR 2K25, OlliOlli World Rad Edition, and TopSpin 2K25 with a hefty $25 price tag. Lastly, the Redline Racing Bundle is touting games like Art of Rally, Descenders, Mudrunner, and Assetto Corsa Competizione with a $10 price tag. Big Deals The biggest promotions of this weekend come from franchise discounts for hits like Mafia, Like a Dragon, Resident Evil, and more. With all those and more, here's our hand-picked big deals list for the weekend: Mafia: The Old Country – $34.99 on Steam ARC Raiders – $31.99 on Steam Forza Horizon 5 – $29.99 on Steam Monster Hunter Wilds – $29.39 on Steam Satisfactory – $27.99 on Steam No Rest for the Wicked – $27.99 on Steam Satisfactory – $27.99 on Steam Esoteric Ebb – $19.99 on Steam Street Fighter 6 – $19.99 on Steam Cloudheim – $19.79 on Steam Pacific Drive – $17.99 on Steam Like a Dragon: Infinite Wealth – $17.49 on Steam ACE COMBAT 7: SKIES UNKNOWN – $14.99 on Steam Yakuza 0 Director's Cut – $14.99 on Steam Like a Dragon Gaiden: The Man Who Erased His Name – $14.99 on Steam Like a Dragon: Pirate Yakuza in Hawaii – $14.99 on Steam Grand Theft Auto V Enhanced – $14.99 on Steam Lost Judgment – $13.99 on Steam The Crew Motorfest – $13.99 on Steam Stronghold Crusader: Definitive Edition – $12.59 on Steam The Stanley Parable: Ultra Deluxe – $12.49 on Steam Blood West – $12.49 on Steam Yakuza Kiwami 2 – $11.99 on Steam Judgment – $11.99 on Steam Like a Dragon: Ishin! – $11.99 on Steam Alien: Isolation – $11.99 on Steam Goat Simulator: Remastered – $10.19 on Steam Resident Evil Village – $9.99 on Steam Yakuza 4 Remastered – $9.99 on Steam Yakuza 5 Remastered – $9.99 on Steam Yakuza 6: The Song of Life – $9.99 on Steam Caravan SandWitch – $9.99 on Steam Spyro Reignited Trilogy – $9.99 on Steam Assassin's Creed III Remastered – $9.99 on Steam The Expanse: A Telltale Series – $9.99 on Steam Sons Of The Forest – $8.99 on Steam Untitled Goose Game – $7.99 on Steam Resident Evil 2 – $7.99 on Steam Resident Evil 3 – $7.99 on Steam Resident Evil 7 Biohazard – $7.99 on Steam Yakuza: Like a Dragon – $7.99 on Steam Airborne Kingdom – $7.49 on Steam Assassin's Creed Syndicate – $7.49 on Steam The Wolf Among Us – $7.49 on Steam Amnesia: The Bunker – $7.49 on Steam Mini Motorways – $6.99 on Steam Age of History 3 – $6.99 on Steam Fabledom – $6.29 on Steam Trine 4: The Nightmare Prince – $5.99 on Steam Mafia: Definitive Edition – $5.99 on Steam Mafia II: Definitive Edition – $5.99 on Steam Resident Evil 6 – $4.99 on Steam Resident Evil 5 – $4.99 on Steam Resident Evil Revelations 2 – $4.99 on Steam Resident Evil 3 Nemesis (1999) – $4.99 on Steam Terra Memoria – $4.99 on Steam FOR HONOR – $4.49 on Steam Metro Exodus – $4.49 on Steam The Forest – $4.39 on Steam Mini Metro – $3.99 on Steam Songs of Conquest – $0 on Epic Store Rogue Waters – $0 on Epic Store Gravity Circuit – $0 on Steam DRM-free Specials The DRM-free store GOG has plenty of discounts to look over this weekend too. Here are some highlights: Trials of Mana - $14.99 on GOG SPORE Collection - $14.99 on GOG Stellaris - $12.49 on GOG FINAL FANTASY VIII - REMASTERED - $7.99 on GOG Final Fantasy IV (3D Remake) - $7.99 on GOG Final Fantasy III (3D Remake) - $7.99 on GOG FINAL FANTASY IX - $6.29 on GOG The Forgotten City - $6.25 on GOG Warlords Battlecry 3 - $5.99 on GOG Heroes of Might and Magic 3: Complete - $4.99 on GOG Heroes of Might and Magic 4: Complete - $4.99 on GOG SimCity 4 Deluxe Edition - $4.99 on GOG FINAL FANTASY VII - $4.79 on GOG Cultures 1+2 - $3.99 on GOG Outlast - $3.75 on GOG Dungeon Keeper 2 - $2.99 on GOG Theme Hospital - $2.99 on GOG Sid Meier's Alpha Centauri Planetary Pack - $2.99 on GOG Dungeon Keeper Gold - $2.99 on GOG Alba: A Wildlife Adventure - $2.55 on GOG Disciples 2 Gold - $1.99 on GOG Outcast - Second Contact - $1.49 on GOG Disciples: Sacred Lands Gold - $1.49 on GOG Port Royale 2 - $0.99 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
    • Exciting! It’s amazing how hearing Japanese can naturally enhance the perceived quality of any experience or product.
    • Your other comment in another article says otherwise, namely "Microsoft veteran wants to replace every single line of C/C++ code with Rust and AI".
    • Sued and... exonerated. Oh, they learned a lesson alright. They learned that anyone who uses the word "antiturst" in conjunction with "Microsoft" is an idiot, even if that person is Judge Thomas Penfield Jackson. That judge ruined the image of the US justice system. Microsoft Edge has a 5.14% market share. Also, Windows is no longer the #1 OS. None of this constitutes a monopoly. Google Chrome, however, has 70.25% share. Also, Google's Android is the #1 OS. Now that's closer to a monopoly.
    • Adobe Acrobat Reader DC 2026.001.21651 by Razvan Serea Adobe Acrobat Reader DC software is the free, trusted standard for viewing, printing, signing, and annotating PDFs. Its the only PDF viewer that can open and interact with all types of PDF content – including forms and multimedia. It’s connected to Adobe Document Cloud – so you can work with PDFs on computers and mobile devices. Adobe Document Cloud is a revolutionary, modern and efficient way to get work done with documents in the office, at home or on-the-go. At the heart of Document Cloud is the all-new Adobe Acrobat DC, which will take e-signatures mainstream by delivering free e-signing with every individual subscription. Document Cloud includes a set of integrated services that use a consistent online profile and personal document hub. With Adobe Document Cloud, people will be able to create, review, approve, sign and track documents whether on a desktop or mobile device. Businesses will be able to take advantage of Document Cloud for enterprise which provides enterprise-class document services that integrate into systems of record such as CRM, HCM, CLM, and CMS, adding speed, efficiency and transparency to getting business done with documents. Adobe Acrobat Reader DC new feature highlights: Work with PDFs from anywhere with the new, free Acrobat DC mobile app for Android or iOS. Select functionality is also available on Windows Phone. Use the new Fill & Sign tool in your desktop software to complete PDF forms fast with smart autofill. Download the free Adobe Fill & Sign mobile app to add the same option to your iPad or Android tablet device. Save money on ink and toner when printing from your Windows PC. Store and access files in Adobe Document Cloud with 5GB of free storage. Get instant access to recent files across desktop, web, and mobile devices with Mobile Link. Sync your Fill & Sign autofill collection across desktop, web, and iPad devices. Adobe PDF Pack premium features includes: Convert documents and images to PDF files. Use your mobile device camera to take a picture of a paper document or form and convert it to PDF. Turn PDFs into editable Microsoft Word, Excel, PowerPoint, or RTF files. Combine multiple files into a single PDF (web only). Get signatures from others with a complete e-signature service. Send, track, and confirm delivery of documents electronically instead of using fax or overnight services (tracking not available on mobile). Store and access files online with 20GB of storage. Download: Adobe Acrobat Reader DC 64-bit | 719.0 MB (Freeware) Link: Adobe Acrobat Reader DC Home Page | Release Notes | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Week One Done
      JKR earned a badge
      Week One Done
    • Rookie
      moog19 went up a rank
      Rookie
    • Mentor
      grik went up a rank
      Mentor
    • Dedicated
      JKR earned a badge
      Dedicated
    • One Year In
      CHUNWEI earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      490
    2. 2
      PsYcHoKiLLa
      271
    3. 3
      Skyfrog
      75
    4. 4
      Steven P.
      68
    5. 5
      FloatingFatMan
      64
  • Tell a friend

    Love Neowin? Tell a friend!