Gentoo Archives: gentoo-amd64

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] Re: FAT tools, where ?
Date: Fri, 04 Dec 2009 18:02:55
Message-Id: pan.2009.12.04.17.35.03@cox.net
In Reply to: Re: [gentoo-amd64] Re: FAT tools, where ? by Lie Ryan
1 Lie Ryan posted on Fri, 04 Dec 2009 17:14:38 +1100 as excerpted:
2
3 > Don't know whether such precaution is necessary, but I kept a small FAT
4 > (actually 8G is not so small) partition in my external harddisk that
5 > contains drivers for ntfs-3g for the platforms that I may meet at the
6 > middle of the road. It saved me a couple of times when I happen to be in
7 > a computer (or Gentoo Live CD) that can't read (or can only read) NTFS.
8
9 I mentioned in another post (I /think/ to this list??) that I recently
10 upgraded to GPT partitioning, using gdisk. GPT has several mechanisms to
11 help ensure boot-time compatibility and that no legacy MBR based
12 partition editor overwrites things accidentally.
13
14 1) There's normally what's called a "protective MBR partition", that
15 makes it look to legacy MBR partition table editors like the entire disk
16 (well, to the 2-TiB boundary which is as far as they see) is a single
17 partition of unknown type. The idea here is to prevent accidentally
18 erasing the GPT partition info.
19
20 2) For legacy BIOS based booting, the first partition (typically 200 KB
21 or so, I made mine a full 1024 KiB, 1 MiB, just to simplify things, but
22 it sure felt strange making a partition that small!) should be reserved
23 as a BIOS boot partition -- basically, it's there to give certain legacy
24 BIOS bootloaders a spot to put their second stages, etc, without
25 overwriting anything else.
26
27 3) For newer EFI based booting, the standard specifies an EFI system
28 partition, FAT32 formatted, of a hundred MB or so. For non-portable
29 disks, only one of the two, either a BIOS boot partition (#2 above) or an
30 EFI system partition, need be present, but I went ahead and put both on
31 mine, even tho my present system doesn't really use either one. The EFI
32 system partition has its own registered partition type, so can be
33 anywhere on the disk, up to the standard 128 partitions that can fit in
34 the standard minimum GPT spec (thus, 128 partitions is the standard,
35 since that's what fits in the minimum spec, and few folks have reason for
36 more than that, tho it's an option available in the spec), but I put it
37 as partition 2, just because. I made mine 127 MiB, so the first two
38 partitions combined are exactly 128 MiB, 1/4 GiB.
39
40 On a full EFI boot system, this EFI system partition can contain the
41 drivers necessary to access any of the other partitions and load the OS.
42 EFI includes its own initial boot loader spec, and OSs can drop drivers
43 here as necessary to chain-load their own loader on their own filesystems.
44
45 As mentioned, the Linux kernel is natively GPT/EFI aware as long as the
46 option is compiled in. According to the documentation, GRUB2 is natively
47 GPT/EFI aware and will use the BIOS boot partition for its second stage
48 and related files. GRUB (legacy, grub1, the 0.97-rX versions Gentoo
49 defaults to at present) isn't natively GPT aware, but there are patches
50 floating around that add the capability, and Gentoo includes those
51 patches, so there's no problem with GRUB1 either, tho it ignores the BIOS
52 boot partition as well as the EFI system partition, placing its second
53 stage in its boot partition, if there's no room to embed it, instead. So
54 one could accurately say GRUB-legacy with the GPT patches only partly
55 supports GPT, it'll boot on it and won't damage it when installing, but
56 won't make use of the reserved BIOS boot partition as GRUB2 does.
57
58 Apparently MS supports GPT/EFI from Vista onward, and of course, Apple
59 does, as they were one of the first on the EFI bandwagon, developing it
60 with Intel.
61
62 4) As mentioned above, EFI speced systems don't have BIOS, per se, any
63 more, EFI replaces it, and don't use conventional boot loaders, either,
64 as the EFI spec has its own. I don't know enough about EFI systems to be
65 sure, but given what I know of computer systems in general, I expect that
66 ultimately, EFI's boot loader will probably simply chain-load the OS
67 native boot loader, in many cases, much as grub does with the MS
68 bootloader, today.
69
70 So FWIW, your "small" 8 gig partition for boot-time compatibility
71 purposes is sort of already built into the GPT/EFI spec. That would
72 contain all you needed to boot the kernel, and if you chose not to build
73 them into your kernels, your ntfs and other kernel modules would be
74 loaded from /boot as standard initramfs/initrd, if necessary, or from the
75 standard /lib/modules/<kern-ver> subdir, if not necessary to load /.
76
77 --
78 Duncan - List replies preferred. No HTML msgs.
79 "Every nonfree program has a lord, a master --
80 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-amd64] Re: FAT tools, where ? Lie Ryan <lie.1296@×××××.com>