Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/floppy/doc/github.com_yeokm1_gentoo-on-486.txt
blob: b477703353e0a0ac7149f96478e10a744b730dfb (plain)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
   #[1]GitHub

   [2]Skip to content

   [3]Sign up (BUTTON)
   (BUTTON)

     * Product
          + [4]Features
          + [5]Mobile
          + [6]Actions
          + [7]Codespaces
          + [8]Copilot
          + [9]Packages
          + [10]Security
          + [11]Code review
          + [12]Issues
          + [13]Integrations
          + [14]GitHub Sponsors
          + [15]Customer stories
     * [16]Team
     * [17]Enterprise
     * Explore
          + [18]Explore GitHub
          + Learn and contribute
          + [19]Topics
          + [20]Collections
          + [21]Trending
          + [22]Skills
          + [23]GitHub Sponsors
          + [24]Open source guides
          + Connect with others
          + [25]The ReadME Project
          + [26]Events
          + [27]Community forum
          + [28]GitHub Education
          + [29]GitHub Stars program
     * [30]Marketplace
     * Pricing
          + [31]Plans
          + [32]Compare plans
          + [33]Contact Sales
          + [34]Education

   ____________________
     * In this repository All GitHub RET
       Jump to RET

     * No suggested jump to results

     * In this repository All GitHub RET
       Jump to RET
     * In this user All GitHub RET
       Jump to RET
     * In this repository All GitHub RET
       Jump to RET

   [35]Sign in
   [36]Sign up

   (BUTTON)
   {{ message }}

   [37]yeokm1 / [38]gentoo-on-486 Public
     * [39]Notifications
     * [40]Fork 6
     * [41]Star 57 (BUTTON)

   Instructions on how to install modern Gentoo Linux on ancient 486-based
   PCs.
   [42]yeokhengmeng.com/2018/01/make-the-486-great-again/

License

   [43]MIT license
   [44]57 stars [45]6 forks
   [46]Star (BUTTON)
   [47]Notifications

     * [48]Code
     * [49]Issues 1
     * [50]Pull requests 0
     * [51]Actions
     * [52]Projects 0
     * [53]Wiki
     * [54]Security
     * [55]Insights

   More
     * [56]Code
     * [57]Issues
     * [58]Pull requests
     * [59]Actions
     * [60]Projects
     * [61]Wiki
     * [62]Security
     * [63]Insights

yeokm1/gentoo-on-486

   This commit does not belong to any branch on this repository, and may
   belong to a fork outside of the repository.
   master

   Switch branches/tags (BUTTON)
   ____________________
   (BUTTON) Branches (BUTTON) Tags
   Could not load branches
   Nothing to show
   [64]{{ refName }} default

   [65]View all branches
   Could not load tags
   Nothing to show
   [66]{{ refName }} default

   [67]View all tags
   [68]1 branch [69]0 tags
   Code

Latest commit


Git stats

     * [70]12 commits

Files

   [71]Permalink
   Failed to load latest commit information.
   Type
   Name
   Latest commit message
   Commit time
   [72]images


   [73].config


   [74]LICENSE


   [75]README.md


   [76]gentoo-on-486-presentation.pptx


   (BUTTON) View code
   ____________________
   [77]gentoo-on-486 [78]The Hardware [79]Deployment machine : IBM PS/1
   Consultant 2133 19C (released in 1993) [80]Compilation machine:
   Thinkpad T430 (released in 2012) [81](Optional) Machine to issue SSH
   commands to compilation machine [82]Instructions [83]1. Preparing the
   install media/disks [84]2. Networking and SSH [85]3. Preparing the
   disks [86]4. Installing stage3 [87]5. Installing base system [88]Read
   the news [89]Set system profile [90]Configure timezone [91]Configure
   locale [92]6. Configuring the kernel [93]Find out system specs [94]Just
   take the latest stable kernel [95]Download a particular kernel version
   [96]Kernel options [97]64-bit Kernel [98]Processor type and features:
   [99]Bus Options [100]Device Drivers [101]File Systems [102]Backup
   kernel configuration [103]Compiling the kernel [104]7. Configuring the
   system [105]Configuring /etc/fstab [106]Set hostname [107]Network info
   [108]System config [109]8. Installing tools [110]Required installs
   [111]Correct syslog issues [112]Optional installs [113]9. Configuring
   the bootloader [114]Install Bootloader [115]Configure LILO [116]10.
   Finalising install [117]Create non-root user [118]Unmount and
   reboot/poweroff system [119]11. Boot on i486 [120]Change preferred
   Python version [121]Update time [122]Sound test [123]Configure Web
   Server [124]Bonus step:

[125]README.md

gentoo-on-486

   Instructions on how to install modern Gentoo Linux on ancient 486-based
   PCs. This is for a command-line install only.

   As Gentoo is a source-based distribution, we have to compile every
   package we install from scratch including the kernel and bootloader.

   This is too time-consuming to do on the 486 PC so I use a modern
   machine to do the compilation then move the disk over to the ancient
   PC.

   I have written a [126]companion blog post that explains the motivations
   and less-technical details.

The Hardware

Deployment machine : [127]IBM PS/1 Consultant 2133 19C (released in 1993)

   [128]Screen
     * AMD 5X86 486-clone running at 133mhz (similar performance to
       Pentium 75Mhz)
     * Cirrus Logic VLB CL-GD5424 Graphics 512KiB VRAM
     * 64MB SDRAM
     * 48x IDE CD ROM Drive
     * [129]Gotek 1.44MB floppy emulator
     * CompactFlash-IDE adapter + 32GB Sandisk Extreme CF card
     * 10Mbps 3Com Etherlink III [130]3c509B (ISA)
     * [131]Sound Blaster 16 CT2950 PnP (ISA) Unfortunately, this card
       uses [132]CQM.
     * 1x Parallel Port
     * 2x Serial Port
     * 1x VGA port

Compilation machine: [133]Thinkpad T430 (released in 2012)

   [134]Screen
     * Intel Core i7-3520M (3.50 GHz, 4MB L3, 1333MHz FSB)
     * Intel HD Graphics 4000
     * 16GB DDR3 - 1600MHz
     * Gigabit Ethernet
     * Ultrabay DVD-RW
     * 2x USB 3.0, 2x USB 2.0
     * USB-CF adapter to compile on CF card
     * SSD removed to avoid corrupting it by accident during install

(Optional) Machine to issue SSH commands to compilation machine

   This can be any machine capable of SSH. This will be explained later.

Instructions

   I heavily reference official [135]Gentoo Wiki x86 handbook with some
   tweaks to suit the 486 as well as ease of repeated builds. Please note
   that my instructions are a compliment and are not a replacement to the
   official guide.

1. Preparing the install media/disks

   [136]Gentoo Wiki: Choosing the media

   I use a CompactFlash card as my hard disk for my 486 PC to make it easy
   to transfer the image back and forth between it and the compilation PC.

   Download the x86 Minimal Installation CD ISO image from [137]official
   download page. You can burn the ISO image to CD or to a USB flash drive
   but I opt for the former for simplicity.

   Once you are done, boot from the install media using your modern
   compilation machine. You might have to adjust your BIOS settings to do
   so.

2. Networking and SSH

   [138]Gentoo Wiki: Configuring the network

   The official guide included quite a bit of information on setting
   things up.

   For my case, I used a wired LAN with DHCP and everything just worked on
   boot. If you need a special configuration, consult that guide.

   I highly recommend that you turn on SSH at this point so you can
   copy-paste the commands to run instead of manually typing in the
   commands. You can even do additional configuration while the packages
   are compiling.
passwd root
New Password: blahblah
Again: blahblah

/etc/init.d/sshd start
ifconfig

   Use the third machine and ssh root@X.X.X.X

3. Preparing the disks

   [139]Gentoo Wiki: Preparing the disks

   The guide suggests 4 partitions with the first one being for the BIOS
   boot partition for EFI systems. Since our 486 obviously predates EFI, I
   opt to ignore that and use the following layout instead.
   Partition Filesystem     Size     Description
   /dev/sda1 ext2       128M         Boot
   /dev/sda2 (swap)     2048M        Swap
   /dev/sda3 ext4       Rest of disk Root

   Just a note, ancient PCs have a [140]504MiB barrier. This means that
   the boot partition should reside entirely within this limit to be
   bootable. Once Linux is started, it can recognise the entire disk.

   I created my partitions using the fdisk tool. Note for the swap
   partition, you have to set the partition type. Type t to set the
   partition type, 2 to select the partition just created and then type in
   82 to set the partition type to "Linux Swap".

   Once done, format the partitions:
mkfs.ext2 /dev/sda1
mkswap /dev/sda2
swapon /dev/sda2
mkfs.ext4 /dev/sda3

mount /dev/sda3 /mnt/gentoo

4. Installing stage3

   [141]Gentoo Wiki: Installing Stage 3

   stage3 contains almost all the files to create a bare minimum system.
date
# If date is wrong, use ntpd to update your PC's clock.
ntpd -q -g

   Download the latest i486 stage3 tarball which at the time of writing is
   named stage3-i486-20180117T214502Z.tar.xz. I highly recommend
   downloading from a mirror close to you instead of using the official
   one.
cd /mnt/gentoo
wget http://gentoo.aditsu.net:8000/releases/x86/autobuilds/current-stage3-i486/s
tage3-i486-20180117T214502Z.tar.xz

# Untar the tarball. If you wish, you can add the `v` verbose option.
tar xpf stage3-i486-20180117T214502Z.tar.xz --xattrs-include='*.*' --numeric-own
er

   The guide says you should edit the /mnt/gentoo/etc/portage/make.conf
   and adjust the CFLAGS and CXXFLAGS to suit your system. However for
   this case, we can skip this as the default is already the 486. But do
   verify just in case.
CFLAGS="-O2 -march=i486 -pipe"
CHOST="i486-pc-linux-gnu"

MAKEOPTS="-j5" # A good choice is the number of CPU cores in the system plus 1
USE="-kde -qt4 -qt5 ffmpeg mp3 alsa"

   If you want to, you can add the MAKEOPTS setting to benefit the
   compilation machine. The optional USE flags is to remove unwanted GUI
   support as well as add some audio support when compiling. MP3 support
   is extremely poor due to the slow processor speed, but you can give it
   a shot.

5. Installing base system

   [142]Gentoo Wiki: Installing base system

   Just run the following commands I lifted from the guide.
mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
# To avoid having to run mirrorselect manually in your next build, you can save
your list and add it next time.
# GENTOO_MIRRORS="http://gentoo.aditsu.net:8000/ http://ftp.iij.ad.jp/pub/linux/
gentoo/ http://ftp.jaist.ac.jp/pub/Linux/Gentoo/ http://ftp.daum.net/gentoo/ htt
p://ftp.kaist.ac.kr/pub/gentoo/ http://ftp.lanet.kr/pub/gentoo/ http://ftp.tware
n.net/Linux/Gentoo/"

mkdir --parents /mnt/gentoo/etc/portage/repos.conf
cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos
.conf/gentoo.conf
cp --dereference /etc/resolv.conf /mnt/gentoo/etc/

mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) ${PS1}"

mkdir /boot # This can be ignored as it seems to exist already
mount /dev/sda1 /boot
emerge-webrsync

Read the news

eselect news list
eselect news read

Set system profile

   The default system profile is [10] default/linux/x86/17.0 (stable)
   which I use.

   Changing system profiles will invoke a long compilation process
   especially for GCC, to save time, you can skip this step for your
   initial test builds.
eselect profile list

# Example changing to profile "default/linux/x86/17.0" which is the 10th profile
 at time of writing
eselect profile set 10
# If profile change is required, run the following:
emerge --ask --update --deep --newuse @world

Configure timezone

ls /usr/share/zoneinfo # To see available locales
echo "Asia/Singapore" > /etc/timezone
emerge --config sys-libs/timezone-data

Configure locale

nano -w /etc/locale.gen
#Adjust your locale settings

locale-gen

eselect locale list
eselect locale set 4 # Change 4 to the one you prefer. Use the one with UTF
env-update && source /etc/profile && export PS1="(chroot) $PS1"

6. Configuring the kernel

   [143]Gentoo Wiki: Configuring the kernel

   The wiki suggest using genkernel tool. It does not seem to work for the
   486 setting so we must use the manual configuration method.

Find out system specs

   pciutils entirely optional especially since my system does not have PCI
   bus.
emerge sys-apps/pciutils sys-apps/lshw

Just take the latest stable kernel

emerge sys-kernel/gentoo-sources

Download a particular kernel version

   I decided to use the 4.14.x kernel release as the previous stable
   4.12.x is rather old by now. However 4.14 is not marked stable, see
   this [144]issue.
emerge --ask =sys-kernel/gentoo-sources-4.14.8-r1 # Then make the config file ch
anges
dispatch-conf # Press 'u' to accept
emerge --ask =sys-kernel/gentoo-sources-4.14.8-r1

Kernel options

cd /usr/src/linux
make menuconfig

   Kernel options I used on top of the default. It might differ for your
   setup. I chose to compile everything into the kernel instead of using
   modules.

   I enable traditional options as well as some modern ones as so the
   kernel can still work with my modern machine if I need to compile new
   packages in future.

64-bit Kernel

     * Uncheck this!!!

Processor type and features:

     * Uncheck "Symmetric multi-processing support"
     * Processor Family - Check 486
     * Check Generic x86 support

Bus Options

     * Check ISA support

Device Drivers

     * Plug and Play support
     *
          + ISA Plug and Play support
     *
          + Plug and Play BIOS support
     * SCSI device support
     *
          + SCSI disk support
     * SATA and PATA drivers
     *
          + Generic ATA support
     *
          + Legacy ISA PATA support (Experimental)
     * Network device support
     *
          + Ethernet driver support
     *
          +
               o 3Com devices
     *
          +
               o
                    # 3c509/3c579 "Etherlink III" support
     * Sound card support
     *
          + ALSA
     *
          +
               o ISA sound devices
     *
          +
               o
                    # Check SB16 (PnP)
     * USB Support
     *
          + xHCI HCD (USB 3.0) Support
     *
          +
               o Generic xHCI driver for a platform device
     *
          + USB Mass Storage support
     *
          +
               o Tick everything related to cards and bridges
     * MMC/SD/SDIO card support

File Systems

     * Enable all Ext2 and Ext4 relevant options
     * CD-ROM/DVD Filesystems
     *
          + Tick all
     * DOS/FAT/NT Filesystems
     *
          + Tick the NTFS options
     * Network File Systems
     *
          + SMB3 and CIFS support
     *
          +
               o Tick relevant sub options

Backup kernel configuration

   To make it easier to do subsequent rebuilds, you might want to backup
   the current configuration. Once you do so, you just have to upload
   .config and don't have to run make menuconfig.
# Backup
scp root@X.X.X.X:/mnt/gentoo/usr/src/linux/.config .

# Put back
scp .config root@X.X.X.X:/mnt/gentoo/usr/src/linux/

Compiling the kernel

make -j5 #Replace 5 with num CPU cores + 1
make modules_install
make install

# This is entirely optional for such an old system but might be useful for your
compilation machine
emerge sys-kernel/linux-firmware

7. Configuring the system

   [145]Gentoo Wiki: Configuring the system

   I only adjust a subset of the settings in the guide that are relevant
   to me.

Configuring /etc/fstab

nano -w /etc/fstab

# Those are my settings based on my partition layout above
/dev/sda1   /boot        ext2    defaults,noatime     0 2
/dev/sda2   none         swap    sw                   0 0
/dev/sda3   /            ext4    noatime              0 1
/dev/cdrom  /mnt/cdrom   auto    noauto,user          0 0

Set hostname

nano -w /etc/conf.d/hostname
hostname="tux"

Network info

emerge --noreplace net-misc/netifrc

nano -w /etc/conf.d/net

# Replace eth0 with the actual network interface name. Use `ifconfig` to check.
# You can put multiple as well to easily transit between the compilation and 486
 PC.
# eth0 is used by my 3Com NIC in the 486 PC
# enxxxx is used by my compilation machine

config_eth0="dhcp"
config_enxxxx="dhcp"
## End

cd /etc/init.d

ln -s net.lo net.eth0
rc-update add net.eth0 default

ln -s net.lo net.enxxxx
rc-update add net.enxxxx default

System config

# Set root password
passwd

nano -w /etc/conf.d/hwclock
# Set local clock instead of UTC if you wish
clock="local"

8. Installing tools

   [146]Gentoo Wiki: Installing tools

Required installs

# Install system logger
emerge app-admin/sysklogd
rc-update add sysklogd default

# Install cron daemon
emerge sys-process/cronie
rc-update add cronie default

# Install file indexing tools
emerge sys-apps/mlocate

# Start SSH on boot
rc-update add sshd default

# Install file systems tools
emerge sys-fs/e2fsprogs sys-fs/dosfstools

# Install DHCP
emerge net-misc/dhcpcd

# NTP
emerge net-misc/ntp

# If ALSA is enabled in the USE flags
emerge media-libs/alsa-lib
emerge media-sound/alsa-utils
rc-update add alsasound boot

# If FFmpeg is enabled in the USE flags
emerge media-video/ffmpeg

Correct syslog issues

   I tested after reboot, I got No such file or directory errors on some
   files. Since I do not need them, I just made the following changes.
nano /etc/syslog.conf

# Comment out the following lines
#news.crit                       /var/log/news/news.crit
#news.err                        /var/log/news/news.err
#news.notice                     -/var/log/news/news.notice

# Change
*.=notice;*.=warn       |/dev/xconsole
# to
*.=notice;*.=warn       |/dev/tty6 # Or any other tty since I don't use xconsole
 on my system.

Optional installs

   Note that the following may take a significant amount time to compile.
emerge sys-apps/hwinfo
emerge www-servers/nginx
emerge dev-vcs/git
emerge media-sound/moc

# Golang only works for Pentium MMX CPUs and up. But you can install this to see
 the failure message for fun.
emerge dev-lang/go

# Gentoo's default Python version is only 3.5 at time of writing. You can instal
l Python 3.6 but Portage and others will still remain on Python 3.5.
emerge dev-lang/python:3.6

# Command line web browsers
emerge www-client/elinks
emerge www-client/w3m
emerge www-client/lynx

9. Configuring the bootloader

   [147]Gentoo Wiki: Configuring the bootloader

Install Bootloader

   In theory, one should use the modern Grub2 bootloader. Grub2 loads ok
   but the system reboots the moment I select a boot option. This seems
   like a known issue given the age of the system. So I use the older LILO
   instead.
emerge sys-boot/lilo

Configure LILO

   Adjust the kernel version to suit yours
nano -w /etc/lilo.conf
### Add the following
boot=/dev/sda             # Install LILO in the MBR
prompt                    # Give the user the chance to select another section
timeout=50                # Wait 5 (five) seconds before booting the default sec
tion
default=gentoo            # When the timeout has passed, boot the "gentoo" secti
on

image=/boot/vmlinuz-4.14.8-gentoo-r1
  label=gentoo
  read-only
  root=/dev/sda3
  vga=4                   # This will set the VGA mode to 80x30

image=/boot/vmlinuz-4.14.8-gentoo-r1
  label=gentoo-ask-vga
  read-only
  root=/dev/sda3
  vga=ask                 # Linux will ask you to pick the VGA mode on startup

image=/boot/vmlinuz-4.14.8-gentoo-r1
  label=gentoo-rescue
  read-only
  root=/dev/sda3
  append="init=/bin/bb"
### End

/sbin/lilo

10. Finalising install

   [148]Gentoo Wiki: Finalizing

Create non-root user

#Add non-root user. By default, you cannot SSH in as root user.
useradd -m -G users,wheel,audio -s /bin/bash john
passwd john

Unmount and reboot/poweroff system

exit
cd
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -R /mnt/gentoo

reboot # This is preferred so the SSH keys can be generated for the first time o
n your compilation machine instead of taking like ages on the 486 PC.
poweroff

   For some strange reason, I cannot reliably boot with a USB-CF card
   adapter. Subsequent powerups on my Thinkpad sometimes fail. Booting up
   with a native SATA-CF adapter works fine. See the bonus step.

11. Boot on i486

   Transfer the disk to the 486 PC and hope it boots! Very slowly.... but
   it'll work. Good luck!

   All commands below except ALSA stuff are only usable if you are the
   root user but I'm sure you can find a way to solve that. You also
   cannot SSH in via the root user by default.

Change preferred Python version

   If you installed another Python version earlier.
eselect python list
# Select your preferred Python version
eselect python set 2

Update time

   Just in case...
ntpd -q -g

Sound test

   If you want to test the sound, you can run the following commands:
alsamixer # Remember to increase PCM volume
speaker-test -t wav -c 2

Configure Web Server

   If you installed nginx earlier, you can try your hand at hosting
   something. [149]Reference
mkdir /var/www/localhost/htdocs
# Create a dummy page
echo 'Hello, world!' > /var/www/localhost/htdocs/index.html
nano /etc/nginx/nginx.conf
# Change `listen 127.0.0.1;` -> `listen 0.0.0.0;`

/etc/init.d/nginx start

# Start on boot
rc-update add nginx default

Bonus step:

   If for some reason you need to rescue the Gentoo installation (say if
   kernel fails), you can try booting up from the install CD and mount the
   disk instead of installing from scratch. These are the instructions you
   can use based on above:
# These are if you want to SSH into the system
passwd root
New Password: blahblah
Again: blahblah

/etc/init.d/sshd start
ifconfig
#

mount /dev/sda3 /mnt/gentoo

mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash
source /etc/profile
export PS1="(chroot) ${PS1}"

mkdir /boot # This can be ignored as it seems to exist already
mount /dev/sda1 /boot

About

   Instructions on how to install modern Gentoo Linux on ancient 486-based
   PCs.
   [150]yeokhengmeng.com/2018/01/make-the-486-great-again/

Topics

   [151]linux [152]linux-kernel [153]gentoo [154]486

Resources

   [155]Readme

License

   [156]MIT license

Stars

   [157]57 stars

Watchers

   [158]10 watching

Forks

   [159]6 forks

[160]Releases

   No releases published

[161]Packages 0

   No packages published

Footer

   © 2022 GitHub, Inc.

Footer navigation

     * [162]Terms
     * [163]Privacy
     * [164]Security
     * [165]Status
     * [166]Docs
     * [167]Contact GitHub
     * [168]Pricing
     * [169]API
     * [170]Training
     * [171]Blog
     * [172]About

   (BUTTON) You can't perform that action at this time.

   You signed in with another tab or window. [173]Reload to refresh your
   session. You signed out in another tab or window. [174]Reload to
   refresh your session.

   (BUTTON)

References

   Visible links:
   1. https://github.com/opensearch.xml
   2. https://github.com/yeokm1/gentoo-on-486#start-of-content
   3. https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo
   4. https://github.com/features
   5. https://github.com/mobile
   6. https://github.com/features/actions
   7. https://github.com/features/codespaces
   8. https://github.com/features/copilot
   9. https://github.com/features/packages
  10. https://github.com/features/security
  11. https://github.com/features/code-review
  12. https://github.com/features/issues
  13. https://github.com/features/integrations
  14. https://github.com/sponsors
  15. https://github.com/customer-stories
  16. https://github.com/team
  17. https://github.com/enterprise
  18. https://github.com/explore
  19. https://github.com/topics
  20. https://github.com/collections
  21. https://github.com/trending
  22. https://skills.github.com/
  23. https://github.com/sponsors/explore
  24. https://opensource.guide/
  25. https://github.com/readme
  26. https://github.com/events
  27. https://github.community/
  28. https://education.github.com/
  29. https://stars.github.com/
  30. https://github.com/marketplace
  31. https://github.com/pricing
  32. https://github.com/pricing#compare-features
  33. https://github.com/enterprise/contact
  34. https://education.github.com/
  35. https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fyeokm1%2Fgentoo-on-486
  36. https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E&source=header-repo&source_repo=yeokm1%2Fgentoo-on-486
  37. https://github.com/yeokm1
  38. https://github.com/yeokm1/gentoo-on-486
  39. https://github.com/login?return_to=%2Fyeokm1%2Fgentoo-on-486
  40. https://github.com/login?return_to=%2Fyeokm1%2Fgentoo-on-486
  41. https://github.com/login?return_to=%2Fyeokm1%2Fgentoo-on-486
  42. http://yeokhengmeng.com/2018/01/make-the-486-great-again/
  43. https://github.com/yeokm1/gentoo-on-486/blob/master/LICENSE
  44. https://github.com/yeokm1/gentoo-on-486/stargazers
  45. https://github.com/yeokm1/gentoo-on-486/network/members
  46. https://github.com/login?return_to=%2Fyeokm1%2Fgentoo-on-486
  47. https://github.com/login?return_to=%2Fyeokm1%2Fgentoo-on-486
  48. https://github.com/yeokm1/gentoo-on-486
  49. https://github.com/yeokm1/gentoo-on-486/issues
  50. https://github.com/yeokm1/gentoo-on-486/pulls
  51. https://github.com/yeokm1/gentoo-on-486/actions
  52. https://github.com/yeokm1/gentoo-on-486/projects?type=beta
  53. https://github.com/yeokm1/gentoo-on-486/wiki
  54. https://github.com/yeokm1/gentoo-on-486/security
  55. https://github.com/yeokm1/gentoo-on-486/pulse
  56. https://github.com/yeokm1/gentoo-on-486
  57. https://github.com/yeokm1/gentoo-on-486/issues
  58. https://github.com/yeokm1/gentoo-on-486/pulls
  59. https://github.com/yeokm1/gentoo-on-486/actions
  60. https://github.com/yeokm1/gentoo-on-486/projects?type=beta
  61. https://github.com/yeokm1/gentoo-on-486/wiki
  62. https://github.com/yeokm1/gentoo-on-486/security
  63. https://github.com/yeokm1/gentoo-on-486/pulse
  64. https://github.com/yeokm1/gentoo-on-486/tree/{{%20urlEncodedRefName%20}}
  65. https://github.com/yeokm1/gentoo-on-486/branches
  66. https://github.com/yeokm1/gentoo-on-486/tree/{{%20urlEncodedRefName%20}}
  67. https://github.com/yeokm1/gentoo-on-486/tags
  68. https://github.com/yeokm1/gentoo-on-486/branches
  69. https://github.com/yeokm1/gentoo-on-486/tags
  70. https://github.com/yeokm1/gentoo-on-486/commits/master
  71. https://github.com/yeokm1/gentoo-on-486/tree/207a5cddd0411495da608736e4e02bb79d1f5780
  72. https://github.com/yeokm1/gentoo-on-486/tree/master/images
  73. https://github.com/yeokm1/gentoo-on-486/blob/master/.config
  74. https://github.com/yeokm1/gentoo-on-486/blob/master/LICENSE
  75. https://github.com/yeokm1/gentoo-on-486/blob/master/README.md
  76. https://github.com/yeokm1/gentoo-on-486/blob/master/gentoo-on-486-presentation.pptx
  77. https://github.com/yeokm1/gentoo-on-486#gentoo-on-486
  78. https://github.com/yeokm1/gentoo-on-486#the-hardware
  79. https://github.com/yeokm1/gentoo-on-486#deployment-machine--ibm-ps1-consultant-2133-19c-released-in-1993
  80. https://github.com/yeokm1/gentoo-on-486#compilation-machine-thinkpad-t430-released-in-2012
  81. https://github.com/yeokm1/gentoo-on-486#optional-machine-to-issue-ssh-commands-to-compilation-machine
  82. https://github.com/yeokm1/gentoo-on-486#instructions
  83. https://github.com/yeokm1/gentoo-on-486#1-preparing-the-install-mediadisks
  84. https://github.com/yeokm1/gentoo-on-486#2-networking-and-ssh
  85. https://github.com/yeokm1/gentoo-on-486#3-preparing-the-disks
  86. https://github.com/yeokm1/gentoo-on-486#4-installing-stage3
  87. https://github.com/yeokm1/gentoo-on-486#5-installing-base-system
  88. https://github.com/yeokm1/gentoo-on-486#read-the-news
  89. https://github.com/yeokm1/gentoo-on-486#set-system-profile
  90. https://github.com/yeokm1/gentoo-on-486#configure-timezone
  91. https://github.com/yeokm1/gentoo-on-486#configure-locale
  92. https://github.com/yeokm1/gentoo-on-486#6-configuring-the-kernel
  93. https://github.com/yeokm1/gentoo-on-486#find-out-system-specs
  94. https://github.com/yeokm1/gentoo-on-486#just-take-the-latest-stable-kernel
  95. https://github.com/yeokm1/gentoo-on-486#download-a-particular-kernel-version
  96. https://github.com/yeokm1/gentoo-on-486#kernel-options
  97. https://github.com/yeokm1/gentoo-on-486#64-bit-kernel
  98. https://github.com/yeokm1/gentoo-on-486#processor-type-and-features
  99. https://github.com/yeokm1/gentoo-on-486#bus-options
 100. https://github.com/yeokm1/gentoo-on-486#device-drivers
 101. https://github.com/yeokm1/gentoo-on-486#file-systems
 102. https://github.com/yeokm1/gentoo-on-486#backup-kernel-configuration
 103. https://github.com/yeokm1/gentoo-on-486#compiling-the-kernel
 104. https://github.com/yeokm1/gentoo-on-486#7-configuring-the-system
 105. https://github.com/yeokm1/gentoo-on-486#configuring-etcfstab
 106. https://github.com/yeokm1/gentoo-on-486#set-hostname
 107. https://github.com/yeokm1/gentoo-on-486#network-info
 108. https://github.com/yeokm1/gentoo-on-486#system-config
 109. https://github.com/yeokm1/gentoo-on-486#8-installing-tools
 110. https://github.com/yeokm1/gentoo-on-486#required-installs
 111. https://github.com/yeokm1/gentoo-on-486#correct-syslog-issues
 112. https://github.com/yeokm1/gentoo-on-486#optional-installs
 113. https://github.com/yeokm1/gentoo-on-486#9-configuring-the-bootloader
 114. https://github.com/yeokm1/gentoo-on-486#install-bootloader
 115. https://github.com/yeokm1/gentoo-on-486#configure-lilo
 116. https://github.com/yeokm1/gentoo-on-486#10-finalising-install
 117. https://github.com/yeokm1/gentoo-on-486#create-non-root-user
 118. https://github.com/yeokm1/gentoo-on-486#unmount-and-rebootpoweroff-system
 119. https://github.com/yeokm1/gentoo-on-486#11-boot-on-i486
 120. https://github.com/yeokm1/gentoo-on-486#change-preferred-python-version
 121. https://github.com/yeokm1/gentoo-on-486#update-time
 122. https://github.com/yeokm1/gentoo-on-486#sound-test
 123. https://github.com/yeokm1/gentoo-on-486#configure-web-server
 124. https://github.com/yeokm1/gentoo-on-486#bonus-step
 125. https://github.com/yeokm1/gentoo-on-486#readme
 126. http://yeokhengmeng.com/2018/01/make-the-486-great-again/
 127. https://en.wikipedia.org/wiki/IBM_PS/1
 128. https://github.com/yeokm1/gentoo-on-486/blob/master/images/gentoo-486-capabilities.jpg
 129. https://www.philscomputerlab.com/gotek-floppy-emulator.html
 130. https://en.wikipedia.org/wiki/3Com_3c509
 131. https://en.wikipedia.org/wiki/Sound_Blaster_16
 132. https://en.wikipedia.org/wiki/Sound_Blaster_16#OPL-3_FM_and_CQM_Synthesis_options
 133. http://www.thinkwiki.org/wiki/Category:T430
 134. https://github.com/yeokm1/gentoo-on-486/blob/master/images/gentoo-486-t430.jpg
 135. https://wiki.gentoo.org/wiki/Handbook:X86
 136. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Media
 137. https://www.gentoo.org/downloads/
 138. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Networking
 139. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Disks
 140. http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html
 141. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Stage
 142. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Base
 143. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Kernel
 144. https://archives.gentoo.org/gentoo-dev/message/57f754009e47732a56bb2e0259f2ac3e
 145. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/System
 146. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Tools
 147. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Bootloader
 148. https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Finalizing
 149. https://wiki.gentoo.org/wiki/Nginx
 150. http://yeokhengmeng.com/2018/01/make-the-486-great-again/
 151. https://github.com/topics/linux
 152. https://github.com/topics/linux-kernel
 153. https://github.com/topics/gentoo
 154. https://github.com/topics/486
 155. https://github.com/yeokm1/gentoo-on-486#readme
 156. https://github.com/yeokm1/gentoo-on-486/blob/master/LICENSE
 157. https://github.com/yeokm1/gentoo-on-486/stargazers
 158. https://github.com/yeokm1/gentoo-on-486/watchers
 159. https://github.com/yeokm1/gentoo-on-486/network/members
 160. https://github.com/yeokm1/gentoo-on-486/releases
 161. https://github.com/users/yeokm1/packages?repo_name=gentoo-on-486
 162. https://docs.github.com/en/github/site-policy/github-terms-of-service
 163. https://docs.github.com/en/github/site-policy/github-privacy-statement
 164. https://github.com/security
 165. https://www.githubstatus.com/
 166. https://docs.github.com/
 167. https://support.github.com/?tags=dotcom-footer
 168. https://github.com/pricing
 169. https://docs.github.com/
 170. https://services.github.com/
 171. https://github.blog/
 172. https://github.com/about
 173. https://github.com/yeokm1/gentoo-on-486
 174. https://github.com/yeokm1/gentoo-on-486

   Hidden links:
 176. https://github.com/
 177. https://github.com/yeokm1/gentoo-on-486
 178. https://github.com/yeokm1/gentoo-on-486
 179. https://github.com/yeokm1/gentoo-on-486
 180. https://github.com/yeokm1/gentoo-on-486
 181. https://github.com/yeokm1/gentoo-on-486#gentoo-on-486
 182. https://github.com/yeokm1/gentoo-on-486#the-hardware
 183. https://github.com/yeokm1/gentoo-on-486#deployment-machine--ibm-ps1-consultant-2133-19c-released-in-1993
 184. https://github.com/yeokm1/gentoo-on-486#compilation-machine-thinkpad-t430-released-in-2012
 185. https://github.com/yeokm1/gentoo-on-486#optional-machine-to-issue-ssh-commands-to-compilation-machine
 186. https://github.com/yeokm1/gentoo-on-486#instructions
 187. https://github.com/yeokm1/gentoo-on-486#1-preparing-the-install-mediadisks
 188. https://github.com/yeokm1/gentoo-on-486#2-networking-and-ssh
 189. https://github.com/yeokm1/gentoo-on-486#3-preparing-the-disks
 190. https://github.com/yeokm1/gentoo-on-486#4-installing-stage3
 191. https://github.com/yeokm1/gentoo-on-486#5-installing-base-system
 192. https://github.com/yeokm1/gentoo-on-486#read-the-news
 193. https://github.com/yeokm1/gentoo-on-486#set-system-profile
 194. https://github.com/yeokm1/gentoo-on-486#configure-timezone
 195. https://github.com/yeokm1/gentoo-on-486#configure-locale
 196. https://github.com/yeokm1/gentoo-on-486#6-configuring-the-kernel
 197. https://github.com/yeokm1/gentoo-on-486#find-out-system-specs
 198. https://github.com/yeokm1/gentoo-on-486#just-take-the-latest-stable-kernel
 199. https://github.com/yeokm1/gentoo-on-486#download-a-particular-kernel-version
 200. https://github.com/yeokm1/gentoo-on-486#kernel-options
 201. https://github.com/yeokm1/gentoo-on-486#64-bit-kernel
 202. https://github.com/yeokm1/gentoo-on-486#processor-type-and-features
 203. https://github.com/yeokm1/gentoo-on-486#bus-options
 204. https://github.com/yeokm1/gentoo-on-486#device-drivers
 205. https://github.com/yeokm1/gentoo-on-486#file-systems
 206. https://github.com/yeokm1/gentoo-on-486#backup-kernel-configuration
 207. https://github.com/yeokm1/gentoo-on-486#compiling-the-kernel
 208. https://github.com/yeokm1/gentoo-on-486#7-configuring-the-system
 209. https://github.com/yeokm1/gentoo-on-486#configuring-etcfstab
 210. https://github.com/yeokm1/gentoo-on-486#set-hostname
 211. https://github.com/yeokm1/gentoo-on-486#network-info
 212. https://github.com/yeokm1/gentoo-on-486#system-config
 213. https://github.com/yeokm1/gentoo-on-486#8-installing-tools
 214. https://github.com/yeokm1/gentoo-on-486#required-installs
 215. https://github.com/yeokm1/gentoo-on-486#correct-syslog-issues
 216. https://github.com/yeokm1/gentoo-on-486#optional-installs
 217. https://github.com/yeokm1/gentoo-on-486#9-configuring-the-bootloader
 218. https://github.com/yeokm1/gentoo-on-486#install-bootloader
 219. https://github.com/yeokm1/gentoo-on-486#configure-lilo
 220. https://github.com/yeokm1/gentoo-on-486#10-finalising-install
 221. https://github.com/yeokm1/gentoo-on-486#create-non-root-user
 222. https://github.com/yeokm1/gentoo-on-486#unmount-and-rebootpoweroff-system
 223. https://github.com/yeokm1/gentoo-on-486#11-boot-on-i486
 224. https://github.com/yeokm1/gentoo-on-486#change-preferred-python-version
 225. https://github.com/yeokm1/gentoo-on-486#update-time
 226. https://github.com/yeokm1/gentoo-on-486#sound-test
 227. https://github.com/yeokm1/gentoo-on-486#configure-web-server
 228. https://github.com/yeokm1/gentoo-on-486#bonus-step
 229. https://github.com/