View previous topic :: View next topic |
Author |
Message |
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
Posted: Tue May 25, 2021 8:28 pm Post subject: boot without a iniramfs with syslinux or grub |
|
|
Hello friends im trying to find a not so complicated tutorial to install syslinux or lilo(which ive never used) on my new gentoobox. Now ive used syslinux for about a year now after using grub for a while in arch and the command in arch i believe is syslinux-install_update -i -a -m and it installs syslinux to /dev/sda,now the thing is im chrooted into gentoo from arch gui with 3 internal hdds and 1 external(which im chrooted into) and attempted to install lilo at first but was getting that Warning: /dev/sdd1 is not on the first disk then i used the -f flag to force it which worked and wouldn't boot(testing on how to boot without a initramfs) .....i have found this https://www.linuxquestions.org/questions/slackware-14/trying-to-update-lilo-on-my-usb-hdd-tells-me-etc-lilo-conf-wasn%27t-found-803559/ and this which is practically my case https://www.linuxquestions.org/questions/linux-software-2/installing-lilo-on-a-usb-external-hdd-738209/ and still have questions as i took about a half a day browsing the net trying to find the fix.Now as for syslinux which i use have configured is there a way to dumb the install down?it would be greatly appreciated if someone could help me......
i will post my lilo.conf as soon as im done installing gentoo on another hdd as i try take notes on installing gentoo....a little easier than the handbook lol and i cant mount that disk right now i believe i used this guide because im trying to accomplish not booting without a initramfs https://firasuke.github.io/DOTSLASHLINUX/post/booting-the-linux-kernel-without-an-initrd-initramfs/
Code: | emerge --info
Portage 3.0.18 (python 3.8.9-final-0, default/linux/amd64/17.1/hardened, gcc-10.2.0, glibc-2.32-r7, 5.10.27-gentoo x86_64)
=================================================================
System uname: Linux-5.10.27-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E7500_@_2.93GHz-with-glibc2.2.5
KiB Mem: 2023160 total, 1309236 free
KiB Swap: 8601596 total, 8601596 free
Timestamp of repository gentoo: Fri, 21 May 2021 23:00:01 +0000
Head commit of repository gentoo: 2564a4ad413f0bf66ff32956f3a4708eee8a914e
sh bash 5.1_p8
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash: 5.1_p8::gentoo
dev-lang/perl: 5.30.3::gentoo
dev-lang/python: 3.8.9_p2::gentoo, 3.9.4_p1::gentoo
dev-lang/rust-bin: 1.51.0::gentoo
dev-util/cmake: 3.18.5::gentoo
sys-apps/baselayout: 2.7::gentoo
sys-apps/openrc: 0.42.1-r1::gentoo
sys-apps/sandbox: 2.23::gentoo
sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake: 1.16.2-r1::gentoo
sys-devel/binutils: 2.35.2::gentoo
sys-devel/gcc: 10.2.0-r5::gentoo
sys-devel/gcc-config: 2.4::gentoo
sys-devel/libtool: 2.4.6-r6::gentoo
sys-devel/make: 4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc: 2.32-r7::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-verify-max-age: 24
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/f
o"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --jobs=2 --load-average=2"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PE
DG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs
e-backup ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-stric
-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-featur
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.ntua.gr
LANG="en_US.UTF-8 UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times -
out=180 --exclude=/distfiles --exclude=/local --exclude=/packages --ex
PORTAGE_TMPDIR="/var/tmp"
USE="acl alsa amd64 bzip2 crypt hardened iconv ipv6 libglvnd libtirpc
x xattr xinerama xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA
es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb
b unixd actions alias auth_basic authn_alias authn_anon authn_dbm auth
z_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_c
cache mime mime_magic negotiation rewrite setenvif speling status uniq
UGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86
18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navc
ripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KE
es text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer
P_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYT
"GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan
l rawnat logmark ipmark dhcpmac delude chaos account"
Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, POR
_RSYNC_EXTRA_OPTS, RUSTFLAGS |
Last edited by pnotz17 on Fri May 28, 2021 1:21 am; edited 5 times in total |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Wed May 26, 2021 5:49 pm Post subject: |
|
|
You mention both LILO and Syslinux, but you can only install one. Which one do you want? LILO is no longer maintained, and I'm not sure if it supports UEFI, is this a UEFI installation? You also mention Arch, are you going to dual boot or did you use Arch only to install Gentoo? How did you set up the partitions on the disk that will contain Gentoo? Which filesystems do they have? |
|
Back to top |
|
|
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
Posted: Wed May 26, 2021 6:05 pm Post subject: |
|
|
well im just stating kind of what happened when i tried to boot without a initramfs also i dont have uefi or efi using mbr my pc is 12 years old and no im not dual booting arch,i was trying to understand why i cant find a simpler tutorial on how to install syslinux as the syntaxing is easier but i figured out just now how t boot without a initramfs by just editing /etc/default/grub and not putting uuid in /etc/fstab at least it worked for me finally...sorry for coming off as i dont know anything, i know i can only use one bootloader and i guess i just didnt know how to put in words what i was thinking at the moment,ive been installing gentoo non stop lol just to take notes and always have a slight issue and having a old pc dont help
Code: | /etc/fstab
/dev/sdd1 / ext4 noatime 0 1
/etc/default/grub
GRUB_DISTRIBUTOR="Gentoo"
GRUB_CMDLINE_LINUX="root=/dev/sdd1 rootwait rootfstype=ext4"
GRUB_DISABLE_OS_PROBER=false
GRUB_CMDLINE_LINUX="quiet splash"
|
now im still confused on how to install syslinux it seems grub is the easiest route i dont get the extlinux isolinux and it seems you have to create a boot partition which im not doing right now |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
Posted: Wed May 26, 2021 7:22 pm Post subject: |
|
|
eh i just dont get it i guess il re read |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Wed May 26, 2021 9:17 pm Post subject: |
|
|
pnotz17 wrote: | [...] but i figured out just now how t boot without a initramfs by just editing /etc/default/grub and not putting uuid in /etc/fstab at least it worked for me finally... | So... you ended up installing GRUB and it worked? Are you going to keep it?
pnotz17 wrote: | i dont get the extlinux isolinux | So according to your other posts, this is a BIOS installation, and you have a single partition with an ext4 filesystem. That means you'd have to install EXTLINUX if you are still interested in Syslinux. According to the documentation, that's an extlinux --install command and a dd command to write to the MBR. Then you'd have to write the configuration file(s).
pnotz17 wrote: | and it seems you have to create a boot partition which im not doing right now | You can have one, but it is not necessary. You can have everything in /dev/sdd1 as well. |
|
Back to top |
|
|
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
Posted: Wed May 26, 2021 11:24 pm Post subject: |
|
|
thank you for your help i was confused with the extlinux stuff
so
Code: | root #dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sdd
fdisk /dev/sdd
Mark the boot partition as active. A * will appear in the "Boot" column:
root #mkdir /boot/extlinux
root #extlinux --install /boot/extlinux
root #ln -snf . /boot/boot
root #cd /usr/share/syslinux
root #cp menu.c32 memdisk libcom32.c32 libutil.c32 /boot/extlinux |
and then configure syslinux.cfg? |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Thu May 27, 2021 2:34 am Post subject: |
|
|
The dd command to use depends on whether you have an MS-DOS partition table or a GPT. gptmbr.bin is for the second case. Post the output of fdisk -l /dev/sdd so that we can see what you have. |
|
Back to top |
|
|
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
Posted: Thu May 27, 2021 2:38 am Post subject: |
|
|
Code: | Disk /dev/sdd: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: U MHZ22 External
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: 0x96aeeb94
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 488397167 488395120 232.9G 83 Linux
|
|
|
Back to top |
|
|
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
Posted: Thu May 27, 2021 2:51 am Post subject: |
|
|
quick question i tested on how to boot without a initramfs on a old IDE drive today which worked.....then i went to replicate that and remove my iniramfs on a external Fujitsu sata drive through a usb port and cant boot with the same kernel config on the same machine, how can i debug my problem? i have gone over the kernel and have checked lspci modules that are loaded multiple times maybe it has something to do with nvme
kernel config
https://github.com/pnotz17/gentoo/blob/main/kernel/config-5.10.27-gentoo
lspci
Code: |
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 10)
Subsystem: Gigabyte Technology Co., Ltd Device 5000
Kernel modules: intel_agp
00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10)
Subsystem: Gigabyte Technology Co., Ltd Device d000
Kernel driver in use: i915
Kernel modules: i915
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD (Realtek ALC887)
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 1 (rev 01)
Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 01)
Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD
Kernel driver in use: uhci_hcd
00:1d.1 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #2 (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD
Kernel driver in use: uhci_hcd
00:1d.2 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #3 (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD
Kernel driver in use: uhci_hcd
00:1d.3 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #4 (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD
Kernel driver in use: uhci_hcd
00:1d.7 USB controller: Intel Corporation NM10/ICH7 Family USB2 EHCI Controller (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-D525TUD
Kernel driver in use: ehci-pci
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
Subsystem: Gigabyte Technology Co., Ltd Device 5001
Kernel driver in use: lpc_ich
Kernel modules: intel_rng, lpc_ich, leds_ss4200
00:1f.2 IDE interface: Intel Corporation NM10/ICH7 Family SATA Controller [IDE mode] (rev 01)
Subsystem: Gigabyte Technology Co., Ltd Device b002
Kernel driver in use: ata_piix
Kernel modules: ata_piix, pata_acpi, ata_generic
00:1f.3 SMBus: Intel Corporation NM10/ICH7 Family SMBus Controller (rev 01)
Subsystem: Gigabyte Technology Co., Ltd GA-8I945PG-RH/GA-D525TUD Mainboard
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
02:00.0 Ethernet controller: Qualcomm Atheros AR8131 Gigabit Ethernet (rev c0)
Subsystem: Gigabyte Technology Co., Ltd GA-G31M-ES2L Motherboard
Kernel driver in use: atl1c |
/etc/fstab
Code: |
/swapfile none swap sw,loop 0 0
/dev/sdd1 / ext4 noatime 0 1
|
/etc/default/grub
Code: |
GRUB_DISTRIBUTOR="Gentoo"
GRUB_CMDLINE_LINUX="root=/dev/sdd1 rootwait rootfstype=ext4"
GRUB_DISABLE_OS_PROBER=false
GRUB_CMDLINE_LINUX="quiet splash" |
Last edited by pnotz17 on Fri May 28, 2021 6:43 am; edited 6 times in total |
|
Back to top |
|
|
pnotz17 n00b
Joined: 03 Nov 2020 Posts: 55
|
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1530 Location: South America
|
Posted: Sat May 29, 2021 9:57 pm Post subject: |
|
|
I never installed Syslinux, but looking at the documentation:
pnotz17 wrote: | so
Code: | root #dd bs=440 conv=notrunc count=1 if=/usr/share/syslinux/gptmbr.bin of=/dev/sdd |
| You have an MS-DOS partition table:
pnotz17 wrote: | Code: | Disklabel type: dos
...
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 488397167 488395120 232.9G 83 Linux |
| so documentation says it should be if=/usr/share/syslinux/mbr.bin
pnotz17 wrote: | A * will appear in the "Boot" column: | Previous output shows that there is no "*". I think that fdisk cannot change that, but parted should, using the set 1 boot on command.
pnotz17 wrote: | Code: | root #mkdir /boot/extlinux
root #extlinux --install /boot/extlinux |
| Yes.
pnotz17 wrote: | Code: | root #ln -snf . /boot/boot |
| I think that this is not needed for your partition layout.
pnotz17 wrote: | Code: | root #cd /usr/share/syslinux
root #cp menu.c32 memdisk libcom32.c32 libutil.c32 /boot/extlinux |
| I would also add vesamenu.c32. I'm not sure how useful memdisk is, but adding it should not hurt.
pnotz17 wrote: | and then configure syslinux.cfg? | Yes. |
|
Back to top |
|
|
|