[solved] netinstall via serial console on apu1d

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[solved] netinstall via serial console on apu1d

Postby Phlox » Oct 29th, '21, 10:20

Perhaps I am trying the impossible, but I would like to try to install Mageia on a PC Engines APU1D.

I can install via the serial console PFSENSE and OPNSENSE and would like to try to install Mageia on it.

The serial console speed is 115200.

What boot options do I need to give the netinstall boot to install Mageia in text only mode via serial console?

EDIT:

Using:
Code: Select all
text console=tty0 console=ttyS0,115200n8

I made it to the installer, installing now.
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas

Re: [solved] netinstall via serial console on apu1d

Postby morgano » Oct 29th, '21, 16:27

Interesting :)
Let us know how it goes!
What is your project goal?
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1314
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: [solved] netinstall via serial console on apu1d

Postby Phlox » Oct 29th, '21, 16:45

I wanted a router/firewall based on Mageia.

So far I have been able to install it but then after the first reboot the whole serial console support seems gone once grub kicks in and I lose all access.

Trying IPFIRE now and I get decent speeds (800Mbit nat, just not fully GB but it works). I get roughly double the speeds then with the FreeBSD based PFsense and OPNsense. The realtek driver support is really crappy under FreeBSD apparently. I know Intel cards are the way to go but on this PC Engines board its just realtek and I got it last year for cheap and always wanted to play with it. Last year I already installed the latest Sea BIOS but had no time to play with it after that.

One way to get access to the device after installation of Mageia is perhaps enabling SSH during install?
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas

Re: [solved] netinstall via serial console on apu1d

Postby Phlox » Oct 30th, '21, 18:22

Some progress...

This is my second installation of Mageia on the apu1d.

I managed to install Mageia again and this time to my own surprise it started to boot with serial console support. I could not see any grub/bootloader just the booting part after it and I can login into the console this time. During the first installation of Mageia on the device I did not see any grub/bootloader and turned it off. This time I waited a bit longer and now I saw it boot.

During the installation I opted to install the openssh server. Later in the summary screen in the select which services to start at boot openssh wasn't to found. After login after the first boot I saw that openssh wasn't running. The summary screen at the end of the installation is really lagging all over the place. When you are in there and trying to select a module to configure the responsiveness is so darn slow. When you open up a module to edit the actual module editing goes without any interface lag.

No more time to play with it after the first login via the console.
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas

Re: [solved] netinstall via serial console on apu1d

Postby morgano » Oct 30th, '21, 21:27

Thanks for retrying and reporting :)
It would be nice to have the procedure to install via serial console documented in our wiki.
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1314
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: [solved] netinstall via serial console on apu1d

Postby doktor5000 » Oct 30th, '21, 22:42

FWIW you could also grab the autoinstall file from your finished install, and edit it to enable the openssh server.
https://wiki.mageia.org/en/Auto_inst
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17659
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [solved] netinstall via serial console on apu1d

Postby Phlox » Oct 31st, '21, 19:01

With the help of drakconf I now have a Mageia router/firewall running on a PC Engines APU1D :)
photo_2021-10-31_17-59-47.jpg
PC Engines APU1d with Mageia 8
photo_2021-10-31_17-59-47.jpg (130.57 KiB) Viewed 2290 times

The only thing drakconf did not do was setting:
Code: Select all
sysctl -w net.ipv4.ip_forward=1

Which is odd because the internet connection sharing wizard takes care of allot like installing named, dhcp server and setting that all up. It really takes you by the hand but it forgets to set that kernel option and with that nothing gets forwarded from LAN to WAN.

Right now it sits on my desktop between our LAN and my laptop.
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas

Re: [solved] netinstall via serial console on apu1d

Postby Phlox » Nov 1st, '21, 12:09

I could not login into the Wiki and add the following.

Let me post it here:


Installing Mageia 8 on the PC Engines APU1d.

You probally can use this information for all other APU1* versions also.

Since the APU1d is a headless device (you can't connect a monitor to it) you need a serial cable to connect to it.

I have a serial cable that on one end is a rs232 connector that goes into the APU1d and on the other end it has a USB connector that goes into your computer.

On my APU1d I installed a newer coreboot/seabios BIOS that fixed some problems with earlier BIOS versions:
https://pcengines.github.io/

After updating the BIOS its time to connect the serial cable to your APU1d and your computer.

I used Mageia-8-netinstall-x86_64.iso and put that image on a small SanDisk Cruzer usb stick drive and put that into one of the USB slots of the APU1d still with the APU powered off.

I used the program "screen" but other terminal programs like minicom and putty should work also.

When you connect your serial cable to your computer run "dmesg" to see which device it added and you need to use.

For example my USB cable information in dmesg showed up like this:

Code: Select all
[ 1048.669354] usb 2-2: new full-speed USB device number 4 using xhci_hcd
[ 1048.824013] usb 2-2: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 1048.824021] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1048.824024] usb 2-2: Product: CP2104 USB to UART Bridge Controller
[ 1048.824026] usb 2-2: Manufacturer: Silicon Labs
[ 1048.824029] usb 2-2: SerialNumber: 0130DA31
[ 1048.869198] usbcore: registered new interface driver usbserial_generic
[ 1048.869209] usbserial: USB Serial support registered for generic
[ 1048.871739] usbcore: registered new interface driver cp210x
[ 1048.871751] usbserial: USB Serial support registered for cp210x
[ 1048.871778] cp210x 2-2:1.0: cp210x converter detected
[ 1048.886077] usb 2-2: cp210x converter now attached to ttyUSB0


The bit of information you want to know is in the last line where it says "attached to ttyUSB0".

On my system I need to make sure the permissions of this device is right so I can use the program screen as a normal user and not as a root user.
Everytime I connect the cable I become root and "chmod 666 /dev/ttyUSB0". After that I can access the device as a normal user.

With the command "screen /dev/ttyUSB0 115200" you open up the connection with the APU1d at a baudrate of 115200 baud.

Now its time to power on the APU1d and if all goes well you should see something like:
Code: Select all
coreboot build 20202905
BIOS version v4.12.0.1

Press F10 key now for boot menu

Select boot device:

1. USB MSC Drive SanDisk Cruzer Fit 1.00
2. AHCI/0: Samsung SSD 850 EVO mSATA 120GB ATA-9 Hard-Disk (111 GiBytes)
3. Payload [setup]
4. Payload [memtest]


Here you can see I pressed F10 and this gives you a boot menu of 4 options and that I also have a 120GB Samsung SSD installed.

Since this is a serial connection you can use your keyboard to input what you want just like on a normal terminal.

In this setup I select 1 to boot of the Mageia netinstall USB install stick and once grub shows up at the boot: line to select which mode you want to install Mageia you type:

Code: Select all
text console=tty0 console=ttyS0,115200n8     <press enter>


This will start the Mageia 8 netinstall in TEXT mode instead of launching a graphical desktop interface and connects console tty0 of the APU1d to your screen session.

From here select from which server on your LAN or on the net you want to install Mageia 8 from.

When it comes to selecting a desktop environment don't and deselect any selected DE's.
Go to advanced options and select router/firewall (or something else like WEB server) and deselect everything desktop related.

Beware: At the end of the installation the Summary screen with all modules is really slow/slugish to navigate through.
Editing a selected module goes without lag.

Don't try to setup everything from there from within the installer.
Just try to get it all installed first and after installation and after the first boot you can customize it all.

When the installer says its done remove the USB stick and reboot.

Wait until "Press F10 key now for boot menu" shows and press F10 and then select the device where you installed Mageia on.

Now wait a couple of seconds (grub is not showed) and if all went well you should see the boot output of Mageia ending up with:
Code: Select all
Mageia release 8 (Official) for x86_64
Kernel 5.10.75-desktop-1.mga8 on a Dual-processor x86_64 / ttyS0
localhost login:


You now have Mageia 8 successfully installed on your APU1d.
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas

Re: [solved] netinstall via serial console on apu1d

Postby Phlox » Nov 2nd, '21, 20:13

For now I will stop testing Mageia on the APU1d and will use a dedicated firewall distribution on it.
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas

Re: [solved] netinstall via serial console on apu1d

Postby morgano » Nov 3rd, '21, 11:51

Phlox wrote:I could not login into the Wiki and add the following.


Thanks for this :)

You are much welcome to join documentation team and get edit rights.

See Documentation team at https://wiki.mageia.org/en/Contributing
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1314
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: [solved] netinstall via serial console on apu1d

Postby Phlox » Nov 3rd, '21, 11:58

morgano wrote:
Phlox wrote:I could not login into the Wiki and add the following.


Thanks for this :)

You are much welcome to join documentation team and get edit rights.

See Documentation team at https://wiki.mageia.org/en/Contributing

Thanks for the invite but I rather not.

I don't have time for that to join any team.

Any way thanks for the invite :)
“Without freedom of choice there is no creativity.” — Captain Kirk
User avatar
Phlox
 
Posts: 19
Joined: Oct 4th, '21, 11:40
Location: Les Pays-Bas


Return to Advanced support

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron