Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: How to change host name?, Change hostname for frugal install?< Next Oldest | Next Newest >
ggiles Offline





Group: Members
Posts: 2
Joined: Aug. 2006
Posted: Aug. 13 2006,21:54 QUOTE

Hi,
I have a frugal laptop install, and can't figure out how to change the hostname. Tried searching the wiki and forum, found two approaches neither of them work, looking for help and ideas.

1. Added host 'cheat code' to lilo (/cdrom/boot/lilo.conf), tried various options / combos (including putting 'dsl' in front of 'host'), however entering 'hostname' from a shell still reports 'box'.

Quote
lba32          #enable large disk support
timeout=30     #wait 3 seconds before auto-booting
vga=791
boot=/dev/hda   #put boot loader in MBR of target disk
root=/dev/hda1 #set root to be partition of target disk
image=/boot/linux24
label=DSL
initrd=/boot/minirt24.gz
read-only
APPEND="ramdisk_size=100000 init=/etc/init lang=us apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce nodma quiet host=LinuxLaptop frugal BOOT_IMAGE=/KNOPPIX/KNOPPIX     "


2. Tried changing /etc/hostname, /etc/hosts and /etc/init.d/knoppix-autoconfig. None of these survive a reboot, as these files are copied from the ISO image at bootup.

Any ideas or suggestions most welcome

Thanks
Greg
Back to top
Profile PM 
Del Offline





Group: Members
Posts: 109
Joined: Dec. 2003
Posted: Aug. 13 2006,22:13 QUOTE

When you modify lilo.conf you have to rerun lilo to make it take hold. To make this happen in a frugal install try this;
mount /mnt/hdaX (where X is the partition containing /boot)
edit /mnt/hdaX/boot/lilo.conf and add the host=blarg boot option
ln -sf /mnt/hdaX/boot / (symlink /mnt/hdaX/boot to /boot )
lilo -C /mnt/hdaX/boot/lilo.conf (run lilo with desired config file)
reboot

--edited for correct lilo args--


--------------
Del
--da da da--
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Aug. 13 2006,22:53 QUOTE

you could also just commit it to the mbr using lilo -C /path/to/lilo.conf
Back to top
Profile PM 
Del Offline





Group: Members
Posts: 109
Joined: Dec. 2003
Posted: Aug. 14 2006,00:51 QUOTE

If I don't "ln -sf /mnt/hdaX/boot /" before running "lilo -C /mnt/hdaX/boot/lilo.conf" I get an error "Fatal: Trying to map files from unnamed device 0x0007 (NFS ?)". After doing the symlinking lilo acts as expected.

My mistake though in my previous post, you do indeed still have to use "lilo -C /mnt/hdaX/boot/lilo.conf", otherwise lilo tries to use /etc/lilo.conf.


--------------
Del
--da da da--
Back to top
Profile PM 
ggiles Offline





Group: Members
Posts: 2
Joined: Aug. 2006
Posted: Aug. 14 2006,02:54 QUOTE

Thanks guys, it worked perfectly. I wish the wiki was open for editing, it's been hard to find this info anywhere else.

Thanks
Greg
Back to top
Profile PM 
4 replies since Aug. 13 2006,21:54 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: How to change host name?

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code