View previous topic :: View next topic |
Author |
Message |
phodgson11 n00b
Joined: 04 Sep 2019 Posts: 7
|
Posted: Sun Jun 20, 2021 6:32 pm Post subject: PXE boot liveUSB to carryout normal disk installation? |
|
|
Hello, I've purchased a laptop with USB-c/thunderbolt ports only(without USB-b) and don't have any flash drives with USB-c connectors to use to boot the installation medium.
I thought I'd learn how to do a network boot instead of just buying a flash drive.
It seems like this should be straightforward as reading an image from a network device rather than a local USB storage device, but apparently it's not that simple.
Using the PXE boot option for the first time, it's become clear that it won't just prompt for an IP address and read a boot image from it; but I have to setup a particular kind of file transfer server on the host device, and even have a specialized router?
Most of the guides on the wiki describe disk-less setups, which I don't want to do. I just want to do a normal Gentoo install.
It seems I have to install a TFTP server and set it up to load the liveCD? I'm sure that's wrong somehow and I'm confusing the instructions for disk-less PXE boot for loading the liveCD with PXE.
(https://wiki.gentoo.org/wiki/PXE#Gentoo_installation, https://wiki.gentoo.org/wiki/Installation_alternatives#Diskless_install_using_PXE_boot_and_NFS) |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Sun Jun 20, 2021 6:41 pm Post subject: |
|
|
phodgson11,
When you PXE boot, you will be booting into a diskless system.
The initrd, kernel and root filesystem will all be mounted over the network.
Once your diskless live media is booted its up to you how you use it.
Its a long time since I have done diskless.
The usual gotcha is that the IP address changes during during boot and you lose the rootfs.
You give an IP address (or dhcpcd) on the kernel command line. The kernel uses that to find its root filesystem. Its a very bad thing if during the course of booting the IP address gets changed
Set up a TFTP server. Put all the bits there and PXE should find it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Jun 20, 2021 6:47 pm Post subject: |
|
|
What linux distro will you be using to set up your pxe server?
You might need
Code: |
tftp syslinux xinetd dhcpcd(or similar) apache
|
_________________
|
|
Back to top |
|
|
phodgson11 n00b
Joined: 04 Sep 2019 Posts: 7
|
Posted: Mon Jun 21, 2021 6:11 am Post subject: |
|
|
Quote: | When you PXE boot, you will be booting into a diskless system.
The initrd, kernel and root filesystem will all be mounted over the network. |
Do I need to do much work in preparing them, or just mount the liveusb and setup the tftp/dhcp servers?
I followed the instructions here https://wiki.gentoo.org/wiki/Installation_alternatives#Diskless_install_using_PXE_from_the_LiveCD
Code: | mkdir -p /tftpboot/gentoo/
cd /tftpboot/gentoo/
mkdir iso/
mount -o loop,ro /tftpboot/ISO-IMAGES/install-amd64-minimal-20210425T214502Z.iso iso/
|
Not sure if I should proceed with diskless/NFS or squashfs/http.
Quote: | What linux distro will you be using to set up your pxe server? |
I'm using my Gentoo desktop, and I've installed TFTP-hpa and dhcpcd.
It's a pain getting the laptop (Lenovo X1 Nano) to even do a PXE boot, secure boot settings and something else interfere with it. I'm not sure if it even supports PXE over wifi, which is what I intended, but it's occurred to me I can connect it to my desktop via a usb cable, and could build a bridge of some kind. Like ethernet over usb, but do I even have to go through that? Is there some way to make the usb port just read like a flash drive, so I can boot the liveusb through it? Like mounting the image on some /dev/usb file, but I don't think mount works that way at all.
Is there some unix kung fu that makes this work? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54216 Location: 56N 3W
|
Posted: Mon Jun 21, 2021 8:57 am Post subject: |
|
|
phodgson11,
I suspect that PXE booting is over wired only.
Bringing up WiFi is a lot more code. Then its WiFi chipset dependent, so your BIOS would be tied to whatever WiFi chipset the manufacturer decided to fit that day.
Ethernet over USB is not a lot better.
It boils down to whatever the BIOS supports.
Is removing the HDD from the laptop and installing in another system on option? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
phodgson11 n00b
Joined: 04 Sep 2019 Posts: 7
|
Posted: Mon Jun 21, 2021 3:19 pm Post subject: |
|
|
NeddySeagoon wrote: | I suspect that PXE booting is over wired only.
Bringing up WiFi is a lot more code. Then its WiFi chipset dependent, so your BIOS would be tied to whatever WiFi chipset the manufacturer decided to fit that day.
Ethernet over USB is not a lot better.
It boils down to whatever the BIOS supports.
|
That's unfortunate; Lenovo hasn't made it clear what the BIOS supports.
Quote: | Is removing the HDD from the laptop and installing in another system on option? |
It's an option, but because both the laptop's HDD and my desktop's main HDD are m.2, and there's only one m.2 slot on my motherboard, I'd have to boot from the liveusb to do the installation. I don't think cross-compiling would be an issue between two Intel chips, but because the desktop would be out of commission for however long it took to install it's just more convenient to buy a USB-C flash drive and wait for it to arrive this evening.
Thanks for the help! I learned a bit anyway and it may be useful later. |
|
Back to top |
|
|
|