Re: bootstrapping from a USB stick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Flash drives tend to have firmware ahead of the "drive" access and sometimes that means that they simply will not work as a boot device.

I am having good luck with Kingston DataTraveler G4 series drives.  What I do to load a Linux (Ubuntu 12 and Fedora 20 tried so far) is to first work with Gparted.  The drive has some unallocated space before the main data partition - which I make sure I do not touch.  What I do is simply - starting from the end of the data portion - shorten that portion to make space for the Linux.  Then I install the Linux using the normal live DVD installer to the flash drive into the large unallocated space I just created - having it make an MBR on the device.

If the bios on your oldish computer will allow booting from flash drives I think it is not a bad approach.  

I have made Clonezilla images of some of my thus formed flash drives which do work well.  But I have not tried using those images to make a new drive from the saved image.  The thing is that the process of making an updated LInux on a drive takes a long time.  If this works it will save a lot of time (for my projects with these drives) and in your situation it would be good to keep a working spare as flash drives, at least for me, tend to simply stop working after a year or two.

Please do let us know how it works out.


On Sun, Aug 31, 2014 at 12:40 PM, Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:

On Aug 31, 2014, at 9:00 AM, D. Hugh Redelmeier <hugh@xxxxxxxxxx> wrote:

> I have an oldish PC that only understands booting from 512-byte
> sectors and then only with MBR disks.
>
> I want to install large new disks on it, and no old disks.  These
> don't even pretend to do 512-byte sectors: 4k all the way (3T and 4T sizes
> aren't good for MBR either).

Uhhh, I haven't seen bare drives in the wild with 4096 byte logical and physical sectors. What's the model of this drive? I've only seen some USB enclosures that do this, and present a 4096 byte logical sector: and only then they come with a drive already in them, they're not empty enclosures. The problem some people have is if the enclosure craps out they try to recover their data and they're SOL because the enclosure caused the drive to present 4096 logical sectors, but the drive itself presents 512 byte logical sectors, and the mismatch makes the drive unreadable, unmountable, because all the reported LBAs are totally wrong. So you have to get a replacement enclosure… well at least, that's the easiest way to deal with it. Maybe someone could hack up a way to do the same thing as the enclosure in software with device mapper (?), that'd be useful.

Old PC's might be OK with GPT so long as there's also a protective MBR. By default anaconda/blivet (the Fedora installer), creates a protective MBR, but also sets a non-standard flag its 0xEE entry that tricks most computer BIOS into accepting GPT. But there are quite a few BIOS that will just face plant. So you have to test it to know for sure.


> I was thinking that I should be able to use a USB flash memory stick
> as the boot device, loading GRUB from there, and then having it boot
> the OS from a big GPT hard disk.  The stick would be permanently
> plugged in.
>
> Is there any reason that this might not work?  Is there a better way?

You could try the above. If not then fall back to your idea. At install time, choose both flash drive and hard drive as installation destinations. Put the /boot mount point on the flash drive, and everything else on the hard drive.


>
> Are there special GRUB modules that I need to convince GRUB's
> installer to put on the USB stick?

No. grub2-install will figure this out, anaconda has already mounted the system as it will be used, and has written an fstab that describes how it's to be mounted, and grub2-install reads that and figures out that the flash drive with /boot on it should receive grub's core.img embedded in the MBR gap. Once that core.img is read, the BIOS is out of the picture.

> What filesystem type is best for the USB stick?  My guess: ext4 is
> fine.

Doesn't really matter it's mainly read-only. It'll only be written to when doing kernel updates.


Chris Murphy
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux