forked from emmett1/lfs-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
executable file
·82 lines (67 loc) · 2.43 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Linux From Scratch LiveCD (Unofficial)
======================================
Project: https://github.com/emmett1/lfs-scripts
Email : [email protected]
* installable (instruction below)
* use port system, pkgutils from CRUX (crux.nu) to manage packages
* multilib (32bit libraries in /usr/lib32)
* livecd support initramfs taken from Venom Linux (venomlinux.org)
* support UEFI
* support booting from ram
Install instruction
-------------------
1. configure partition
- for UEFI, GPT partition is required and a FAT32 partition with
at least 100MB set as 'EFI System' must be created.
# cfdisk
# mkfs.vfat -F32 /dev/sda1
# mkswap /dev/sda2
# mkfs.ext4 -L LFS /dev/sda3
2. mount partition
- create mountpoint directory then mount your root partition.
# mkdir -p /mnt/lfs
# mount /dev/sda3 /mnt/lfs
- for UEFI, mount EFI partition created earlier to /boot/efi in
your root partition.
# mkdir -p /mnt/lfs/boot/efi
# mount /dev/sda1 /mnt/lfs/boot/efi
3. install now
- run 'lfs-install <root mountpoint>' to extract squashed filesystem
into your root partition.
# lfs-install /mnt/lfs
4. chroot into your installed lfs system
- run 'lfs-chroot <root mountpoint>' to enter chroot.
# lfs-chroot /mnt/lfs
5. configure fstab
- on UEFI, make sure uncomment entry for EFI partition
# vim /etc/fstab
6. configure hostname
# vim /etc/hostname
7. configure root passwd
- root password is mandatory, you can't login for blank root password
# passwd
8. configure user
- add user
# useradd -m -G users,wheel,audio,video -s /bin/bash <yourusername>
- user's password
# passwd <yourusername>
9. generate initramfs
- initramfs is mandatory since shipped kernel installed is generic
kernel and most of config is built as module
# mkinitramfs -o /boot/initrd-lfs.img
10. configure grub
- for BIOS
# grub-install /dev/sda
- for UEFI
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=lfs_grub --recheck /dev/sda
- for UEFI in Virtualbox you need to configure this, else you gonna stuck at
Virtualbox UEFI
# mkdir -p /boot/efi/EFI/BOOT
# cp /boot/efi/EFI/lfs_grub/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI
- then generate grub config, for BIOS and UEFI
# grub-mkconfig -o /boot/grub/grub.cfg
11. Exit chroot and reboot
# exit
# umount /mnt/lfs/boot/efi
# umount /mnt/lfs
# reboot