~alpine/devel

[alpine-devel] Unable to access serial console during initial installation

John Henderson <jh982@hotmail.com>
Details
Message ID
<CY1PR04MB22018D6330ACAF944E652032FEDF0@CY1PR04MB2201.namprd04.prod.outlook.com>
Sender timestamp
1476415590
DKIM signature
missing
Download raw message
[Please note that I posted this at the beginning of the week on alpine-user (no responses as of now), but it seems like this report might better be classified as a dev issue, so I'm re-posting here.  Thanks!]

Hi, 

I'm trying to install Alpine Linux 3.4.4 (via extended 64-bit ISO) on a Netgate RCC-VE 2440 system (specialized Intel Rangeley-based SOHO router-type hardware; if interested, see: http://store.netgate.com/ADI/RCC-VE-2440.aspx ). 

I'm unable to proceed since I can't get the installation to come up on the serial console. This particular hardware has no video access, and no expansion capabilities to (even temporarily) enable it. I can't even swap HDDs/SSDs or the like (if I wanted to go down that road), since I'm actually installing Alpine to the eMMC flash soldered on-board the Netgate... 

For context, I followed the instructions at: 

  http://wiki.alpinelinux.org/wiki/Enable_Serial_Console_on_Boot 

Namely, I modified the syslinux configuration file ('/boot/syslinux/syslinux.cfg') on the default install media, as follows: 

  *** syslinux.cfg.orig	2016-09-28 11:43:51.000000000 -0500 
  --- syslinux.cfg	2016-10-08 15:44:03.581309751 -0500 
  *************** 
  *** 1,7 **** 
     
    timeout 20 
    prompt 1 
    default grsec 
    label grsec 
            kernel /boot/vmlinuz-grsec 
  ! append initrd=/boot/initramfs-grsec modloop=/boot/modloop-grsec modules=loop,squashfs,sd-mod,usb-storage quiet 
  --- 1,8 ---- 
     
  + serial 0 115200 
    timeout 20 
    prompt 1 
    default grsec 
    label grsec 
            kernel /boot/vmlinuz-grsec 
  ! append initrd=/boot/initramfs-grsec modloop=/boot/modloop-grsec modules=loop,squashfs,sd-mod,usb-storage console=ttyS0,115200 

With this modification, I'm able to boot the install DVD over serial console, get past the BIOS, choose my boot device, and view two kernel messages after Alpine Linux starts to boot --- right up to the point where the initramfs takes over. After that, I can't get anything on the console, try as I might (I don't get gibberish, which might reflect mismatched tty parameters --- I just don't get anything at all). Now, my understanding is that the initramfs is supposed to "inherit" the proper kernel boot command-line parameters (and therefore continue with a properly configured serial console). However, that doesn't seem to be happening in this case. 

Looking around the Alpine Linux code, I thought I might have found a relevant bug in the '/init' script within the initramfs on the install media, as the optional getty invocation (tied to serial console access) actually reverses the order of its arguments. Here's my patch for that (note the exchange of the '$speed' and '$tty' environmental variables): 

  *** init.orig	2016-10-08 17:25:30.853250350 -0500 
  --- init	2016-10-10 10:02:58.629366556 -0500 
  *************** 
  *** 130,136 **** 
                    if ! grep -q "^$tty:" $sysroot/etc/inittab; then 
                            echo "# enable login on alternative console" \ 
>> $sysroot/etc/inittab 
  ! echo "$tty::respawn:/sbin/getty $line $speed $tty $term" \ 
>> $sysroot/etc/inittab 
                    fi 
                    if [ -e "$sysroot"/etc/securetty ] && ! grep -q -w "$tty" "$sysroot"/etc/securetty; then 
  --- 130,136 ---- 
                    if ! grep -q "^$tty:" $sysroot/etc/inittab; then 
                            echo "# enable login on alternative console" \ 
>> $sysroot/etc/inittab 
  ! echo "$tty::respawn:/sbin/getty $line $tty $speed $term" \ 
>> $sysroot/etc/inittab 
                    fi 
                    if [ -e "$sysroot"/etc/securetty ] && ! grep -q -w "$tty" "$sysroot"/etc/securetty; then 


Unfortunately, even after fixing this (presumptive?) bug, I still can't get any serial communication after initramfs on boot. 

Any ideas, please? 

Thanks, 
John 

---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)