Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Hi Paul, Sorry for the delay getting back to you, just got back from a week on the playa lighting up dust storms with 2.4 and 5.8ghz wifi... :-) ;-) The reason I'm not really enthusiastic about this idea is that it adds a new dependency between sylinux, initrd and the etc package and also adds extra complexity to the linuxrc script. Something that I like to avoid as much as possible, because, for example, makes a change to a different kernel more difficult. Not really, or not as I understand it. It's looking at /proc/cmdline, which is going to have the console port specified on it if a serial console is chosen, unless someone makes source code changes to the kernel or is running a non x86 kernel, neither of which are B-U worries until the cross compilation environment works. :-) As far as I can tell, there is no dependency on initrd, or syslinux at all. I would do the same thing running grub or any other kind of boot loader. What I mean is that a setting in the bootloader is parsed via linuxrc in the initrd to change a file in the etc package. With changing to a different kernel I mean from linuxrc/initrd to initramfs. If you're going to actually publish and maintain hardware specific configdb's, then what I'm proposing is not necessary. However, I've become a big fan of having code just do the right thing when the right thing is fairly obvious and considered this in the same vein as my runtime patch to figure out that the keyboard controller wasn't present. I'm also a big of just do the right thing, but in the case of your kernel patch the solution was a lot cleaner and more generic. For example ttyS2 is not taken into account, which also needs a change in /etc/securetty. Just a year ago you were compiling (or not, as the case was) special kernels for the WRAP unit when all we needed was a one line test in the kernel to support a runtime fix. The serial console stuff is currently the one thing getting in the way of just copying the .lrp files over and having them run. An advantage of using some hardware specific configdb packages is that you can also set some other standard options, like selecting the right modules in /etc/modules, some network options and comment out the normal ttys. I was going to ask you what configdb things you would do for hardware specific changes besides fixing inittab. Frankly, a HW specific distribution with pre-populated moddb's wouldn't be awful. A few things that could be done in a HW specific configdb/moddb in the case of a WRAP f.e. is setting the serial console, disabling normal consoles, selecting the wd1100 module with the right parameters and the correct NIC module. Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Sorry for the delay getting back to you, just got back from a week on the playa lighting up dust storms with 2.4 and 5.8ghz wifi... :-) The reason I'm not really enthusiastic about this idea is that it adds a new dependency between sylinux, initrd and the etc package and also adds extra complexity to the linuxrc script. Something that I like to avoid as much as possible, because, for example, makes a change to a different kernel more difficult. Not really, or not as I understand it. It's looking at /proc/cmdline, which is going to have the console port specified on it if a serial console is chosen, unless someone makes source code changes to the kernel or is running a non x86 kernel, neither of which are B-U worries until the cross compilation environment works. :-) As far as I can tell, there is no dependency on initrd, or syslinux at all. I would do the same thing running grub or any other kind of boot loader. If you're going to actually publish and maintain hardware specific configdb's, then what I'm proposing is not necessary. However, I've become a big fan of having code just do the right thing when the right thing is fairly obvious and considered this in the same vein as my runtime patch to figure out that the keyboard controller wasn't present. Just a year ago you were compiling (or not, as the case was) special kernels for the WRAP unit when all we needed was a one line test in the kernel to support a runtime fix. The serial console stuff is currently the one thing getting in the way of just copying the .lrp files over and having them run. An advantage of using some hardware specific configdb packages is that you can also set some other standard options, like selecting the right modules in /etc/modules, some network options and comment out the normal ttys. I was going to ask you what configdb things you would do for hardware specific changes besides fixing inittab. Frankly, a HW specific distribution with pre-populated moddb's wouldn't be awful. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Hi Paul, What it saves them from having to do is hand mess with etc.lrp on a second system the very first time they load the flash. There is absolutly no need for that. We will release some specific configdb packages for certain types of hardware, so it's just a matter of copying the right configdb package to the storage media and of you go. OK, fair enough, if the console speed and everything else is the same. I'm not sure I understand the reluctance to using this idea, but since I'm not the one stuck doing maintenance, it's wrong of me to continue to try to argue with you. Sorry for being a pain in the ass--I re-read my last message and the tone is not what I intended. The reason I'm not really enthusiastic about this idea is that it adds a new dependency between sylinux, initrd and the etc package and also adds extra complexity to the linuxrc script. Something that I like to avoid as much as possible, because, for example, makes a change to a different kernel more difficult. An advantage of using some hardware specific configdb packages is that you can also set some other standard options, like selecting the right modules in /etc/modules, some network options and comment out the normal ttys. I will keep your idea in mind. Best and thanks, Paul Regards, Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Hi Paul, Hmmm, not sure. I find it a bit of a clutch. What happens if an user edit the inittab for other changes like mgetty? I prefer specific configdb/sylinux.cfg for different hardware where also other changes can be done. Eric --Apple-Mail-3-25159442 Content-Type: multipart/mixed; boundary=Apple-Mail-2-25159350 --Apple-Mail-2-25159350 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=fixup_inittab.sh Content-Disposition: attachment; filename=fixup_inittab.sh #!/bin/sh inittab=/etc/inittabX proto=/etc/inittabX.proto if [ -f $inittab ] ; then exit 0 fi if [ ! -f $proto ] ; then echo $0: $proto not missing exit 1 fi contty=`sed -e 's/.*console=\([^, ]*\).*/\1/' /proc/cmdline` if [ -z $contty ] ; then contty=unspecified speed=38400 else speed=`sed -e 's/.*console=[^, ]*,\([0-9]*\) .*/\1/' /proc/cmdline` if [ -z $speed ] ; then speed=9600 fi fi sed -e s/^#${contty} #\(.*\) speed \(.*\)/\1 ${speed} \2/ $proto $inittab chown root:root $inittab chmod 644 $inittab exit 0 --Apple-Mail-2-25159350 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=inittabX.proto Content-Disposition: attachment; filename=inittabX.proto # /etc/inittab: init(8) configuration. # $Id: inittab,v 1.1 2004/10/14 19:09:29 espakman Exp $ # The default runlevel. id:2:initdefault: # Boot-time system configuration/initialization script. # This is run first except when booting in emergency (-b) mode. si::sysinit:/etc/init.d/rcS # What to do in single-user mode. ~~:S:wait:/sbin/sulogin # /etc/init.d executes the S and K scripts upon change # of runlevel. # # Runlevel 0 is halt. # Runlevel 1 is single-user. # Runlevels 2-5 are multi-user. # Runlevel 6 is reboot. l0:0:wait:/etc/init.d/rc 0 l1:1:wait:/etc/init.d/rc 1 l2:2:wait:/etc/init.d/rc 2 l3:3:wait:/etc/init.d/rc 3 l4:4:wait:/etc/init.d/rc 4 l5:5:wait:/etc/init.d/rc 5 l6:6:wait:/etc/init.d/rc 6 # Normally not reached, but fallthrough in case of emergency. #z6:6:respawn:/sbin/sulogin # What to do when CTRL-ALT-DEL is pressed. #ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now # Action on special keypress (ALT-UpArrow). kb::kbrequest:/bin/echo Keyboard Request--edit /etc/inittab to let this work. # What to do when the power fails/returns. pf::powerwait:/etc/init.d/powerfail start pn::powerfailnow:/etc/init.d/powerfail now po::powerokwait:/etc/init.d/powerfail stop # /sbin/getty invocations for the runlevels. # # The id field MUST be the same as the last # characters of the device (after tty). # # Format: # id:runlevels:action:process #unspecified #1:2345:respawn:/sbin/getty speed tty1 #2:23:respawn:/sbin/getty 38400 tty2 #3:23:respawn:/sbin/getty 38400 tty3 #4:23:respawn:/sbin/getty 38400 tty4 #5:23:respawn:/sbin/getty 38400 tty5 #6:23:respawn:/sbin/getty 38400 tty6 # Example how to put a getty on a serial line (for a terminal) # #ttyS0 #T0:23:respawn:/sbin/getty -L ttyS0 speed vt100 #ttyS1 #T1:23:respawn:/sbin/getty -L ttyS1 speed vt100 # Example how to put a getty on a modem line. # #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 #Example how to run portslave # #T0:23:respawn:+/usr/sbin/portslave 0 #T1:23:respawn:+/usr/sbin/portslave 1 #T2:23:respawn:+/usr/sbin/portslave 2 #T3:23:respawn:+/usr/sbin/portslave 3 --Apple-Mail-2-25159350-- --Apple-Mail-3-25159442 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGCjCCAsMw ggIsoAMCAQICAw9vBTANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt YWlsIElzc3VpbmcgQ0EwHhcNMDUwOTA3MDgzNjIzWhcNMDYwOTA3MDgzNjIzWjA9MR8wHQYDVQQD ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMRowGAYJKoZIhvcNAQkBFgtwc3RAcHN0Lm9yZzCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALX7gWLYsyUdCcC482MWa8DvlMkWXgMFITVEHabU NhrjkjE4vys41ipZkaxbzmaXDCoe2kc/uC1WyapF/zbzytYdhXodZtN1/TzBiZY9M5d71UlKwkUc /c8v2XQrexgBV0uiql6cd3iyE8iMm5+8R85F3355aSSEZVewsPvfMJqgMkiTm9R7pWleANIA+ReQ Fn+N7rCbKsJ6nyppsgwsFWObRDMGq+MAagSoYDHgZipbnFHI2aIBCNLodul6/QKbg3OY0yFOBfkQ fc0sN+Mig1EHluOOSOvhqTt/+3I1pZCYFor6RoKTCkj1LmzFdIpLb/rozv/qy+Pu3FLZxaYnBakC AwEAAaMoMCYwFgYDVR0RBA8wDYELcHN0QHBzdC5vcmcwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0B AQQFAAOBgQAz9oO6Svfp/8ZSLpqYsXy1EtftxkFe31z4eLefxgeBreyMeeJKgcZdi0Tge5KeMsUH GchxzE+rnWT9ptoO0kQ9qn2CB0Qyi/APEA8WSHQH3U77eKJBmxbqLI8z8Y62ojYBW/SF0mZkUmyP r5drfbHJVXssdmNHyN++oETkytSCDDCCAz8wggKooAMCAQICAQ0wDQYJKoZIhvcNAQEFBQAwgdEx CzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEa MBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vydmlj ZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTErMCkGCSqG SIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhhd3RlLmNvbTAeFw0wMzA3MTcwMDAwMDBaFw0x
Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Hi Paul, A real /etc/inittab is always present, it's part of the etc.lrp package... Eric Look at the script. If a real /etc/inittab is present, it doesn't do its magic. It only does it if the proto is present and /etc/inittab is not. This is one of the most annoying things for a new user to fix if they don't have a linux system handy. I would call it, or hook it into /var/lib/lrpkg/root.whatever that script is called that gets executed before /sbin/init. The script that loads all the packages at boot time... On Aug 26, 2006, at 1:49 AM, Eric Spakman wrote: Hi Paul, Hmmm, not sure. I find it a bit of a clutch. What happens if an user edit the inittab for other changes like mgetty? I prefer specific configdb/sylinux.cfg for different hardware where also other changes can be done. Eric --Apple-Mail-3-25159442 Content-Type: multipart/mixed; boundary=Apple-Mail-2-25159350 --Apple-Mail-2-25159350 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=fixup_inittab.sh Content-Disposition: attachment; filename=fixup_inittab.sh #!/bin/sh inittab=/etc/inittabX proto=/etc/inittabX.proto if [ -f $inittab ] ; then exit 0 fi if [ ! -f $proto ] ; then echo $0: $proto not missing exit 1 fi contty=`sed -e 's/.*console=\([^, ]*\).*/\1/' /proc/cmdline` if [ -z $contty ] ; then contty=unspecified speed=38400 else speed=`sed -e 's/.*console=[^, ]*,\([0-9]*\) .*/\1/' /proc/ cmdline` if [ -z $speed ] ; then speed=9600 fi fi sed -e s/^#${contty} #\(.*\) speed \(.*\)/\1 ${speed} \2/ $proto $inittab chown root:root $inittab chmod 644 $inittab exit 0 --Apple-Mail-2-25159350 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=inittabX.proto Content-Disposition: attachment; filename=inittabX.proto # /etc/inittab: init(8) configuration. # $Id: inittab,v 1.1 2004/10/14 19:09:29 espakman Exp $ # The default runlevel. id:2:initdefault: # Boot-time system configuration/initialization script. # This is run first except when booting in emergency (-b) mode. si::sysinit:/etc/init.d/rcS # What to do in single-user mode. ~~:S:wait:/sbin/sulogin - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Hi Paul, Not if it's not. You're the software developer, you make the distribution etc.lrp. The whole point of this thing is to get people running with a working console. Once they're on their feet, i.e. if they edit the /etc/inittab or do a backup after the real inittab is working, things behave just as before. What it saves them from having to do is hand mess with etc.lrp on a second system the very first time they load the flash. There is absolutly no need for that. We will release some specific configdb packages for certain types of hardware, so it's just a matter of copying the right configdb package to the storage media and of you go. Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel
Re: [leaf-devel] runtime fixup of /etc/inittab for serial consoles
Eric Spakman wrote: Hi Paul, Not if it's not. You're the software developer, you make the distribution etc.lrp. The whole point of this thing is to get people running with a working console. Once they're on their feet, i.e. if they edit the /etc/inittab or do a backup after the real inittab is working, things behave just as before. What it saves them from having to do is hand mess with etc.lrp on a second system the very first time they load the flash. There is absolutly no need for that. We will release some specific configdb packages for certain types of hardware, so it's just a matter of copying the right configdb package to the storage media and of you go. Eric OK, fair enough, if the console speed and everything else is the same. I'm not sure I understand the reluctance to using this idea, but since I'm not the one stuck doing maintenance, it's wrong of me to continue to try to argue with you. Sorry for being a pain in the ass--I re-read my last message and the tone is not what I intended. Best and thanks, Paul - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel