Re: bootstrapping from a USB stick

2014-09-01 Thread D. Hugh Redelmeier
| From: Chris Murphy 

| On Aug 31, 2014, at 9:00 AM, D. Hugh Redelmeier  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.

You were right about that (and I was wrong).  Thanks!

So I didn't need the mess and bother of a flash stick.

| 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 actually installed Ubuntu 14.04 on the drive (for MythBuntu).  It
required a mysterious tiny partition at the start but didn't explain
much about it.  The result worked.

Then the requirements changed and I threw the result away :-)
-- 
users mailing list
users@lists.fedoraproject.org
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


Re: bootstrapping from a USB stick

2014-08-31 Thread Tod Merley
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 
wrote:

>
> On Aug 31, 2014, at 9:00 AM, D. Hugh Redelmeier  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@lists.fedoraproject.org
> 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@lists.fedoraproject.org
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


Re: bootstrapping from a USB stick

2014-08-31 Thread Chris Murphy

On Aug 31, 2014, at 9:00 AM, D. Hugh Redelmeier  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@lists.fedoraproject.org
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


bootstrapping from a USB stick

2014-08-31 Thread D. Hugh Redelmeier
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).

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?

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

What filesystem type is best for the USB stick?  My guess: ext4 is
fine.
-- 
users mailing list
users@lists.fedoraproject.org
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