Following the advice of akhiezer in his note from 18-May-2017, I'm going
back to try to install LFS stable version 8.0, in order to gradually work
up to installing LFS systemd development version with LVM, LABEL/UUID in
fstab, intramfs, etc.
However, I'm getting conceptually stuck at how to boot with my EFI
motherboard (Asus TUF Mark 1), using the lfs-uefi.txt hint mentioned in
the LFS
book, ch. 8.4.1.
Note that my host Fedora is on /dev/sda, and I'm putting LFS on
/dev/sdd. Other hard disks contain incomplete experiments, with /dev/sdc
containing
an incomplete systemd.
>From the lfs-uefi.txt hint in LFS book, ch. 8.4.1 at
# http://www.linuxfromscratch.org/hints/downloads/files/lfs-uefi.txt
####
MOUNT EFI PARTITION
Determine which device is the EFI partition using gdisk or
parted,
enter the chroot environment, create /boot/efi if needed, and
mount -vt vfat /dev/sda(x) /boot/efi
where sda(x) is the device containing the EFI partition.
####
Two sticking points:
1. I assume that with my present setup, I should use /dev/sdd rather
than /dev/sda, because I DON'T want to change the Fedora boot stuff.
Rather, I
want to be able to boot directly from the LFS disk. Ultimately, I want
to use a boot manage like RodsBooks' rEFTnd (which I successfully installed
on /dev/sdb). And if I remove all disks, but /dev/sdd, I want to boot
directly from that.
2. Do I use the LFS book's instructions on partitioning a strictly MBR
boot setup, or make GPT partitions? See the information and discussion
below.
To let you see my setup, I've gotten some info on my setup from various
disk commands.
The difference between a stricly MBR partition scheme and a GPT scheme
can be seen in the outputs from the following info commands, executed in the
LFS chroot or Fedora host environment as needed. Note that I'm inserting
some comments for clarification:
# In LFS chroot:
######
root:/sources# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
# Development Version 20170518-systemd
sdc 8:32 0 1.8T 0 disk
|-sdc1 8:33 0 1G 0 part
|-sdc2 8:34 0 32G 0 part
|-sdc3 8:35 0 1G 0 part
|-sdc4 8:36 0 200G 0 part
|-sdc5 8:37 0 200G 0 part
`-sdc6 8:38 0 500G 0 part
# Stable Version 8.0
sdd 8:48 0 931.5G 0 disk
|-sdd1 8:49 0 1G 0 part /boot
|-sdd2 8:50 0 32G 0 part [SWAP]
|-sdd3 8:51 0 200G 0 part /
|-sdd4 8:52 0 1K 0 part
|-sdd5 8:53 0 200G 0 part /opt
`-sdd6 8:54 0 498.5G 0 part /home
...
######
# In LFS chroot:
######
root:/sources# fdisk -l /dev/sdc
Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 758C423C-3C5D-472B-92C3-ACB1B2026A7A
Device Start End Sectors Size Type
/dev/sdc1 2048 2099199 2097152 1G EFI System
/dev/sdc2 2099200 69208063 67108864 32G Linux swap
/dev/sdc3 69208064 71305215 2097152 1G Linux filesystem
/dev/sdc4 71305216 490735615 419430400 200G Linux filesystem
/dev/sdc5 490735616 910166015 419430400 200G Linux filesystem
/dev/sdc6 910166016 1958742015 1048576000 500G Linux filesystem
######
######
root:/sources# fdisk -l /dev/sdd
Disk /dev/sdd: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x66f87996
Device Boot Start End Sectors Size Id Type
/dev/sdd1 * 2048 2099199 2097152 1G 83 Linux
/dev/sdd2 2099200 69208063 67108864 32G 82 Linux swap /
Solaris
/dev/sdd3 69208064 488638463 419430400 200G 83 Linux
/dev/sdd4 488638464 1953525167 1464886704 698.5G 5 Extended
/dev/sdd5 488640512 908070911 419430400 200G 83 Linux
/dev/sdd6 908072960 1953525134 1045452175 498.5G 83 Linux
######
# On Fedora host:
######
[root@localhost alan]# gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 758C423C-3C5D-472B-92C3-ACB1B2026A7A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 1948289133 sectors (929.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB EF00 EFI System
2 2099200 69208063 32.0 GiB 8200 Linux swap
3 69208064 71305215 1024.0 MiB 8300 Linux
filesystem
4 71305216 490735615 200.0 GiB 8300 Linux
filesystem
5 490735616 910166015 200.0 GiB 8300 Linux
filesystem
6 910166016 1958742015 500.0 GiB 8300 Linux
filesystem
######
######
[root@localhost alan]# gdisk -l /dev/sdd
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Disk /dev/sdd: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): A768F63C-F079-4A13-BF52-382AEB2FFA3A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 6110 sectors (3.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB 8300 Linux
filesystem
2 2099200 69208063 32.0 GiB 8200 Linux swap
3 69208064 488638463 200.0 GiB 8300 Linux
filesystem
5 488640512 908070911 200.0 GiB 8300 Linux
filesystem
6 908072960 1953525134 498.5 GiB 8300 Linux
filesystem
######
Here is my first cut at /etc/fstab for systemd on /dev/sdc:
######
[root@localhost rootlfs1]# cat etc/fstab
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sdc4 / ext4 defaults 1 1
/dev/sdc3 /boot ext4 defaults 1 2
/dev/sdc1 /boot/efi vfat defaults 0 2
/dev/sdc5 /opt ext4 defaults 1 2
/dev/sdc6 /home ext4 defaults 1 2
/dev/sdc2 swap swap pri=1 0 0
######
Here is my first cut at /etc/fstab for non-systemd on /dev/sdd:
######
root:/sources# cat /etc/fstab
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sdd3 / ext4 defaults 1 1
/dev/sdd1 /boot ext4 defaults 1 2
/dev/sdd5 /opt ext4 defaults 1 2
/dev/sdd6 /home ext4 defaults 1 2
/dev/sdd2 swap swap pri=1 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
# End /etc/fstab
######
Given the above and the discussion of having a /boot/efi vfat partition
in the
hints, I'm thinking that the /dev/sdd fstab should be this:
######
...
/dev/sdd5 / ext4 defaults 1 1
/dev/sdd3 /boot ext4 defaults 1 2
/dev/sdd1 /boot/efi vfat defaults 0 2
/dev/sdd6 /opt ext4 defaults 1 2
/dev/sdd7 /home ext4 defaults 1 2
/dev/sdd2 swap swap pri=1 0 0
...
######
Note that /dev/sdd4 would be the MBR extended partition.
While I wait for some advice, I'll be installing the extra software
required by the hints.
Question: has anyone on the LFS staff besides the authors (Dan McGhee,
Kevin M. Buckley) gone through all this? I'm happy to be a guinea pig,
because I'm learning a lot.
Alan
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style