WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Odd host name glitch in 2.8  (Read 2809 times)

Offline tyler

  • Newbie
  • *
  • Posts: 3
Odd host name glitch in 2.8
« on: January 25, 2010, 03:17:29 AM »
While trying out Tiny Core 2.8 I ran into an odd problem: the host name boot code would work fine if I booted from a CD, but when I booted off a hard disk with the new bzImage and tinycore.gz and added the boot codes in grub, the host string -- and only that part of the boot codes -- would be ignored.

Code: [Select]
tyler@box:~$ uname -a
Linux box 2.6.29.1-tinycore #1337 SMP Fri Apr 10 19:12:39 EEST 2009 i686 GNU/Linux
tyler@box:~$ echo $HOSTNAME

tyler@box:~$ showbootcodes
host=bowl180 user=tyler tz=PST waitusb=5 base

To reiterate, this behavior doesn't appear when booting from a CD. Weird, eh?

Is there some easy way to manipulate the host name of TC at the command line? My experience in Ubuntu has been that the old-fashioned ways of changing the host name won't work there, but perhaps in TC there's a simple sequence to change the host name?

Cheers,
Tyler

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Odd host name glitch in 2.8
« Reply #1 on: January 25, 2010, 07:02:35 AM »
"hostname name" should work for the session.

Seems that the hostname routines still ignore the first bootcode; change the order, for example put tz as the first bootcode. It's for the cd behavior where the first code will be bogus, ie "tinycore" or "microcore".
The only barriers that can stop you are the ones you create yourself.

Offline tyler

  • Newbie
  • *
  • Posts: 3
Re: Odd host name glitch in 2.8
« Reply #2 on: January 25, 2010, 05:09:55 PM »
Thanks for the hints. And while I'm at it, thanks for all your work on the project and forum!

Shuffling the sequence so "host=" isn't the first code does indeed avoid the problem.

The host name in Linux reminds me of the brain surgery scene at the beginning of Buckaroo Banzai where Buckaroo advises the other doctor: "Don't tug on that! You never know what it might be attached to."

In this case, "sudo hostname foo" will update the host name. Unfortunately it also confuses the X server(?) so that the menu system becomes unresponsive. (Right click on the desktop, for example, and the "logout" app won't launch.)

So, the second step to manually updating the hostname is to hit <clt>+<alt>+<bksp> to kill X and then "startx" at the resulting command line. After that, everything seems to be operating normally with the new host name.

Thanks again,
Tyler