ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Computers & Software»
  • Operating Systems

How To Make A Windows and Linux Multiboot USB Flash Drive Part 2 (How I did it)

Updated on February 7, 2018

How I did it

I would suggest that you do things in the following order, as re-sizing and re-partitioning seems to cause some confusion to Knoppix;

In Windows XP, use UBUSB.exe This will make your drive bootable into a live windows system, with Grub4Dos already installed. The windows live system will be on a single partition.

Boot from your Knoppx live CD and use gparted to resize this partition to about 2Gb. This will leave plenty of room for some useful extra tools etc. for when you are using the drive as a “normal” drive in a Windows operating system. (You may get an error message telling you that the operation failed. Ignore it, it is most likely OK, but when the operation has finished, reboot into Knoppix so your system is happy with the change.

Now, create a new extended partition using all the remaining available room, and create 5 or 6 logical partitions from it. I used about 800Mb for most of them, but made one of them 1Gb as one of the ISO’s I wanted to put on was too big for a CD – it was nearly 900 Mb. I formatted each of these with FAT32 file systems. Again, reboot into Knoppix, so the system sees all the changes properly.

Next, use the dd command (see above) to copy iso images you have stored on your hard drive, or just use your existing Linux CD’s. and copy them using dd. (Remember to alter the path for “dd if=/…..” accordingly.) Notice the speech marks ” ” which are necessary if the path on your drive has spaces in it “Documents and Settings” for example. The dd command won’t understand the path without them. I would suggest copying the iso’s one at a time, and getting the flash drive working with each one, adding to them as you succeed with each. It saves a lot of time if you go wrong and have to start all over again!

Check in gparted that the flag “boot” is set to your first partition (the one with the live windows system on it) otherwise when you try to reboot your system with the flash drive, it won’t work.

Creating the menu

Now the fun part! Either use a text editor in Knoppix or use your Windows XP normal operating system to edit the file “Menu.lst” which, together with grldr, shoud be on the main first partition for your drive along with the windows live files. (This partition should be the only one visible in your windows xp operating system.) Menu.lst is a normal text file, and is grub’s menu list. It will need to reflect what is where on your flash drive. Grub is like a mini operating system, and if you boot into it and press c, you will be able to use the command line to see what is where on the various partitions. (If I remember correctly, grub is case sensitive so typng C instead of c will not work!)

Knoppix shows the partitions on the desktop and in gparted as sda1, sda2 etc, but grub understands them as (hd0,0), (hd0,1) etc, meaning (drive 1,partition 1), (drive 1,partition2). Notice that Knoppix starts at number 1 for the first drive/partition, and grub starts at 0 for the first drive/partition!

As a guide, my Grub4Dos Menu is shown on the “my Menu.lst page” on this page, along with an example of the Linux vs Grub naming system.


USB drive

Making a Windows and Linux multiboot USB drive might not be easy, but it can be done!
Making a Windows and Linux multiboot USB drive might not be easy, but it can be done!

Working out what to put in the menu was tricky at first, until I found a site where I learned that all the information is in a file on each of the iso’s called isolinux.cfg You just need to note the information (leave it where it is!) and use it to help you make your own Menu.lst for grub. Compare my menu (see the “my Menu.lst” page) with the isolinux.cfg file in the relevant iso’s of your own and you will see what I mean. You can look in your iso’s using something like winrar in Windows XP.

Note from my list that the first command in all the “blocks” is “title”. This can be followed by anything you like, and will be displayed when you boot your system from the flash drive, so make it meaningful to you! To load into the Windows Live system the command on the second line is chainloader, but to load into all the Linux Systems (which the others are) the first command on the second line is kernel, and the first command on the third line is initrd.

I hope you find this guide useful. Like I said, in no way is it meant to be a full tutorial. it just has some tips in it which I found really difficult to find or work out. Use this guide in conjunction with the programmes own manuals and other sites and forums. Making this bootable flash drive is fairly easy – when you know how!!! It has taken me literally hours and hours to get to this point!

My Menu.lst file

My Menu.lst

splashimage=(hd0,0)/MyFiles/hubble.xpm.gz
foreground=0033FF
background=FF3300

title UBCD4Windows
chainloader (hd0,0)/ntldr

title BackTrack 3 Graphics mode (VESA KDE)
kernel (hd0,4)/boot/vmlinuz vga=0×317 ramdisk_size=6666 root=/dev/ram0 rw autoexec=kdm
initrd (hd0,4)/boot/initrd.gz

title Knoppix V5.1
kernel (hd0,5)/boot/isolinux/linux ramdisk_size=100000 init=/etc/init
initrd (hd0,5)/boot/isolinux/minirt.gz

title Ophcrack
kernel (hd0,6)/boot/vmlinuz ramdisk_size=6666 root=/dev/ram0 autoexec=xconf;startx changes=/slax/
initrd (hd0,6)/boot/initrd.gz

title Masterkey
kernel (hd0,7)/boot/vmlinuz vga791 max_loop=255 ramdisk_size=6666 root=/dev/ram0
initrd (hd0,7)/boot/initrd.gz

title BackTrack 4 Beta
kernel (hd0,9)/boot/vmlinuz ramdisk_size=6666 root=/dev/ram0
initrd (hd0,9)/boot/initrd.gz

The first “block” can be left out altogether. The first line is just a command to put the splashimage “hubble.xpm.gz” which is located on the first partition in the “MyFiles” folder, on the screen behind the menu. Yes, this DOES work in Grub4Dos! The next two commands set the foreground and background colours of the menu text.

Partition 8 is currently empty.

Below is how grub sees the drives, compared to how Knoppix sees them. In this case, Knoppix was booted from a live CD so I could work on the flash drive. Then, the computer was booted from the flash drive so I could compare how grub saw the same thing.

In Knoppix, sda1 is equivalent to (hd0,0) and means “first drive (i.e. flash drive), first partition”

In Knopix, sda2 is equivalent to Grubs (hd0,1) and means “first drive, second partition”

In Knoppix, sda3 is equivalent to Grubs (hd0,2) and means “first drive, third partition”

etc.

Do remember that when you boot from your flash drive to check that things are working and to find out where things are by using grubs command line, your flash drive and not your normal hard drive is (hd0)! The first partition on my normal hard drive in this case is (hd1,0) which grub takes to mean the second drive, first partition!


Good luck - please let me know how you get on!

Comments

    0 of 8192 characters used
    Post Comment

    No comments yet.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: "https://hubpages.com/privacy-policy#gdpr"

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)