Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
I am quite new to this forum (this is my first post) so do please forgive any details or issues that are copied from other threads. Currently I am running ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2012
    Posts
    29

    Install to USB - Yes I have done research


    I am quite new to this forum (this is my first post) so do please forgive any details or issues that are copied from other threads.

    Currently I am running on Ubuntu 11.4 and it works fine. I have an 8GB flash that I wanted to install the fedora live robotics spin onto, however I would also like to keep the flash as having the ability to store and transfer personal data - like any normal flash drive. I used the dd if=<isoImage> of=/dev/sdg command to install it once and successfully boot from the flash. However, when I installed the spin it took up all the space on my flash drive.

    I was wondering if there is a way that I can install the fedora live spin in this manner: Partition the drive into 3 partitions - 1GB for the fedora-live os, 1GB for swap space so that the os doesn't run slow, and a 6GB partition that would act as a regular flash as if i just bought one from the store.

    I used dd if=/dev/zero of=/dev/sdg to wipe the flash then repartitioned it used fdisk. I put a bootable flag on the 1st partition and used partition 2 for the swap. Partition 3 was the 6GB partition as described above. I then used mkfs.vfat for the first and third partitions to format them. Finally I ran dd if=<isoimage> of=/dev/sdg1 bs=1GB to install the fedora spin to the 1 GB patition on my flash. I then unmounted the flash (actually I can't exactly remember at what points it was mounted or not but i'm pretty sure that it was mounted when I installed the iso to the flash). I then tried to boot from the flash and i recieved the isolinux.boot is missing or is corrupt error.

    The PC does boot from flash, and no, the flash drive is not broken.

  2. #2
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    Hello,

    You need a bootloader like GRUB installed on the MBR of your USB drive.

    1. Mount your first partition. (ex: /mnt/sdg1)
    2. To install grub run the command grub-install --root-directory=/mnt/sdg1/ /dev/sdg
    3. Then create the config file with grub-mkconfig -o /mnt/sdg1/boot/grub/grub.cfg
    4. Use the generated config file to chainload the /dev/sdg1

    Good luck,

  3. #3
    Just Joined!
    Join Date
    Mar 2012
    Posts
    29
    Thank you, I shall try that soon. Also, I tried to use the 6GB partition of the flash as a USB today with Windows 7. When I plugged it in the PC it did not accept the filesystem format. Is this because it doesn't know which partition to load or that Windows 7 is not compatable with the FAT32 filesystem?

  4. $spacer_open
    $spacer_close
  5. #4
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    I just closed a similar thread today, browse back and have a loot at it.

    Your 'Windows' OS will only recognize the first partition from your USB. Create the first partition for data transfer to see it in 'Windows'

    Cheers,

  6. #5
    Just Joined!
    Join Date
    Mar 2012
    Posts
    29
    Alrighty. I'm trying that currently and will post the results. Thanks again.

  7. #6
    Just Joined!
    Join Date
    Mar 2012
    Posts
    29
    When I am loading grub onto my usb where do i put it? I re arranged the partitions so that it would be compatible with windows so now the 1st partition is the 6G, and the 2nd partition is the boot-flagged partition with the Fedora*.iso image on it.

  8. #7
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    Hello,

    Don't worry about the boot flag, Grub will load any bootable partition.

    GRUB must be on the MBR so that your BIOS can recognize it. The boot sequence should be:

    BIOS --> MBR --> 2nd partition

    The MBR is too small to keep all the GRUB files but it's the only place visible for your BIOS. The GRUB image from the MBR will simply just redirect the boot sequence to the rest of its files, usually in /boot/grub. You can place this folder on the same partition with your Fedora.

    grub-install --root-directory=/mnt/sdg2 #location for your /boot/grub folder /dev/sdg #MBR location

    See the GRUB manual to see how to chainload your 2nd partition and create the menu

    *you can also instruct GRUB to boot without chainloading, using the kernel img and RAM-disk image from your distribution but it's not always possible / needed.

    **all this information is for GRUB2 bootloader and not GRUB Legacy (old version).

    Good Luck!

  9. #8
    Just Joined!
    Join Date
    Mar 2012
    Posts
    29
    I didn't think it would be such a problem but booting from the grub is kicking my butt (probably because im newb at this).

    Ok when I go to boot from a computer that has windows on its harddisks I hit <F12> to pull up the boot menu. I select the USB Drive and it then pulls up a command line that looks like so:

    grub>

    Obviously this is grub commandline (I think). First I have read the tutorial for GRUB and I have no idea how to know what my current root is. Also, how do I know where the fedora image is? I use the UUID command and I see a 4 drives : hd0,0; hd0,1; hd1,0; hd1,1. The first two are vfat file systems and the last two are ntfs.

    Honestly I'm completely lost as what to do.

  10. #9
    srj
    srj is offline
    Just Joined! srj's Avatar
    Join Date
    Jan 2012
    Location
    Bucharest
    Posts
    86
    Hello again,

    I strongly recommend to read the full GRUB manual to fully understand the application. *Also remember that GRUB is not the only bootloader available out there, I only recommended it because I find it to be the best.

    I'm guessing that the 4 drives you mentioned are:
    *again I'm guessing you used the 'ls' command.

    hd0,0 - first USB partition
    hd0,1 - second USB partition
    hd1,0 - first hard-disk partition
    hd1,1 - second hard-disk partition

    To have a functional GRUB menu you should first generate and edit the grub.cfg file after you installed the application on the MBR and first partition (as I mentioned before in the first post).

    *the below is only valid in GRUB2 and not GRUB LEGACY

    Your config (grub.cfg) Fedora entry should look something like this:

    menuentry "Fedora" {
    insmod part_msdos
    insmod vfat
    set root='(hd0,1)'
    chainloader +1
    }

    Don't try to copy paste the above information in your file. I only assumed that from the information you provided. If your really want GRUB to be your bootloader take some time and read the full manual, examples and documents to understand it. (it's not hard at all but this is required).

    *Also please understand that I'm no expert either, I just bumped into GRUB too, a couple of days ago and read all the manuals, documents, etc.

    If I can, I will answer other questions you might have regarding this. Other users may help you with different bootloaders.

    Best of luck,

  11. #10
    Just Joined!
    Join Date
    Mar 2012
    Posts
    29
    Ok, the grub worked (i put the code in for now from the grub command line for now, just to make sure everything worked). I found my second partition and went to boot from that. However I received the isolinux error again. I checked the isolinux.cfg file and I think it's corrupted because I get the "read error" from Vim everytime I try and open it. I learned from another forum that when using dd if=... of=/dev/sdg1 they recieved the same error - and using /dev/sdg instead fixed it. however this wipes my entire drive and is not what I want to do. Is there a way that I can install without re partitioning and formatting?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •