diff options
author | marcel <marcel@FreeBSD.org> | 2004-08-07 04:03:18 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-08-07 04:03:18 +0000 |
commit | 72c008cc1d0e9bf6ac3e5d352244ea16938361e5 (patch) | |
tree | 729d0e363bf2eafc8549fd4d88ff1cb8797fbd1b /usr.sbin/sade | |
parent | a34feb1b97eeddad92bc8a7aab3be391247ff685 (diff) | |
download | FreeBSD-src-72c008cc1d0e9bf6ac3e5d352244ea16938361e5.zip FreeBSD-src-72c008cc1d0e9bf6ac3e5d352244ea16938361e5.tar.gz |
Create an EFI partition when the user wants auto defaults. There's
some confusion as to how large the EFI system partition should be,
but 100MB seems to be either the maximum, the minimum or the default
size, so make the EFI partition 100MB.
Diffstat (limited to 'usr.sbin/sade')
-rw-r--r-- | usr.sbin/sade/label.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c index cbee57a..c752f73 100644 --- a/usr.sbin/sade/label.c +++ b/usr.sbin/sade/label.c @@ -1387,6 +1387,9 @@ try_auto_label(Device **devs, Device *dev, int perc, int *req) daddr_t sz; Chunk *AutoHome, *AutoRoot, *AutoSwap; Chunk *AutoTmp, *AutoUsr, *AutoVar; +#ifdef __ia64__ + Chunk *AutoEfi; +#endif int mib[2]; unsigned long physmem; size_t size; @@ -1399,6 +1402,25 @@ try_auto_label(Device **devs, Device *dev, int perc, int *req) (void)checkLabels(FALSE); AutoHome = AutoRoot = AutoSwap = NULL; AutoTmp = AutoUsr = AutoVar = NULL; + +#ifdef __ia64__ + AutoEfi = NULL; + if (EfiChunk == NULL) { + sz = 100 * ONE_MEG; + AutoEfi = Create_Chunk_DWIM(label_chunk_info[here].c->disk, + label_chunk_info[here].c, sz, efi, 0, 0); + if (AutoEfi == NULL) { + *req = 1; + msg = "Unable to create the EFI system partition. Too big?"; + goto done; + } + AutoEfi->private_data = new_part(PART_EFI, "/efi", TRUE); + AutoEfi->private_free = safe_free; + AutoEfi->flags |= CHUNK_NEWFS; + record_label_chunks(devs, dev); + } +#endif + if (RootChunk == NULL) { sz = requested_part_size(VAR_ROOT_SIZE, ROOT_NOMINAL_SIZE, ROOT_DEFAULT_SIZE, perc); |