Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: Unique Hostname

  1. #11
    Junior Member
    Join Date
    Nov 2005
    Posts
    5
    Firnsy,
    Can you please post or send the modification to the init script? And also let me know how I integrate it with the Knoppix DVD image? I have two machines side by side, each running molecular modeling software with Knoppix as OS, and it is a pain rebooting, as I have to 'su' then 'hostname Athlon64' BEFORE I start Samba. That does work for me, however, and it allows the Windoze boxes to see seperate machines on the network neighborhood.

  2. #12
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    Quote Originally Posted by trevmar
    Firnsy, Can you please post or send the modification to the init script?
    Same request: could you please post your update of linuxrc ?
    I would like to add this functionality in my initrd_iso.gz ramdisk boot file.
    I can obviously reinvent the wheel but I am lazy by nature...
    Thanks, Gilles

  3. #13
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674

    hostname= cheatcode

    Done !
    I modified the linuxrc boot script to setup the hostname at boot time (kernel cheatcode: hostname=mymachine)
    Please follow the link below to get the updated minirt_host.gz ramdisk file:
    http://www.knoppix.net/forum/viewtop...?p=96827#96827
    Please give it a try and give me some feedback.
    Thanks,
    Gilles

  4. #14
    Member registered user
    Join Date
    Mar 2005
    Posts
    87
    Alternatively, I posted my patch in the Customising/Remastering section http://www.knoppix.net/forum/viewtopic.php?t=22301

    It expands a little further by providing an autogenerating option which will append the MACADDRESS to at the end of the knoppix string.

  5. #15
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    Quote Originally Posted by firnsy
    Alternatively, I posted my patch in the Customising/Remastering section http://www.knoppix.net/forum/viewtopic.php?t=22301
    It expands a little further by providing an autogenerating option which will append the MACADDRESS to at the end of the knoppix string.
    Thank you very much !
    I will try to add your macaddress hostname option when I have some time.

    The solution I have chosen do not require a remaster of the 689MB KNOPPIX file
    but only the use of the new 2.4MB minirt_host.gz boot ramdisk.
    It will work "as is" with the official KNOPPIX file or the official Knoppix ISO cd/dvd image.
    cf: http://www.knoppix.net/forum/viewtop...?p=96827#96827

    Technical description:
    ==============
    The trick was to find a way (using the linuxrc boot script) to have
    the hostname updated way after the end of the execution of the linuxrc boot script
    and after the end of the execution of the knoppix-autoconfig auto detection script.
    (The knoppix-autoconfig script is responsible for the hardcoded knoppix hostname)
    The knoppix-autoconfig script file being located within the 700MB KNOPPIX file
    an update of this file requires a remaster, which in my case, was not desirable.

    To achieve this, the linuxrc boot script overwrite the content of the file /etc/hostname
    with the hostname provided in the kernel command line (after the UNIONfs has been mounted)
    Then, to force Knoppix to read this file after the linuxrc boot script and the knoppix-autoconfig
    auto detection script have run and setup the machine hostname to the hardcoded knoppix name,
    the linuxrc create a soft link (ln -s /etc/init.d/hostname.sh /etc/rcS.d/S01hostname.sh)
    in order to have the init process to launch the execution of the hostname.sh script
    which is used to update the machine hostname using the previously updated /etc/hostname file.
    CQFD.

    Best Regards,
    Gilles

  6. #16
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    Hello,
    If someone is till interested in that, I now have added the option to use dynamic hostnames:
    hostname=auto-clock -> knoppix-200512031753 (date+time)
    hostname=auto-mac -> knoppix-123456789012 (eth0 mac address)
    cf: http://www.knoppix.net/forum/viewtop...?p=96986#96986
    Cheers,
    Gilles

  7. #17

    Brilliant

    I love it do you not?:I:I

  8. #18
    Junior Member
    Join Date
    Nov 2005
    Posts
    5
    ruymbeke,
    I have changed the minirt.gz on my Knoppix 4.0.2 distribution DVD to your 25 Dec 2005 version of minirt-usb2.gz

    when I give the boot string 'knoppix hostname=Athlon64' the system boots OK. The hostname is Athlon64

    but Samba is awfully slow. If I select a volume from my Windows 2000 Pro machine it takes maybe 2 minutes to log in, and then another 2 minutes to show me files.

    when I give the command 'su' I get the following error message:
    'sudo: unable to lookup Athlon64 via gethostbyname()'

    I guess I can live without su, but have you any idea what I can do to speed up the Samba access?

    Thanks for all you are doing for the community,
    Trevor

  9. #19
    Member registered user
    Join Date
    Mar 2005
    Posts
    87
    Quote Originally Posted by trevmar
    ruymbeke,
    I have changed the minirt.gz on my Knoppix 4.0.2 distribution DVD to your 25 Dec 2005 version of minirt-usb2.gz

    when I give the boot string 'knoppix hostname=Athlon64' the system boots OK. The hostname is Athlon64

    but Samba is awfully slow. If I select a volume from my Windows 2000 Pro machine it takes maybe 2 minutes to log in, and then another 2 minutes to show me files.

    when I give the command 'su' I get the following error message:
    'sudo: unable to lookup Athlon64 via gethostbyname()'

    I guess I can live without su, but have you any idea what I can do to speed up the Samba access?

    Thanks for all you are doing for the community,
    Trevor
    The reason for the error is that the /etc/hosts file does not have the machine name assigned to the local ip (127.0.0.1), from what I can determine, ruymbeke's method changes the hostname but does not modify the /etc/hosts file which is required.

  10. #20
    Junior Member
    Join Date
    Nov 2005
    Posts
    5
    Yes, of course, Firnsy, thanks for reminding me
    I will set up the hosts file manually for now

    Thanks again

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. PATCH: Adding unique hostname generation with cheatcode
    By firnsy in forum Customising & Remastering
    Replies: 0
    Last Post: 12-01-2005, 11:09 AM
  2. pump to get hostname
    By hall in forum Networking
    Replies: 1
    Last Post: 09-29-2005, 01:01 PM
  3. Problem Unique to Knoppix Later Versions!(SIS problem!)
    By bongski55 in forum Hardware & Booting
    Replies: 4
    Last Post: 11-15-2003, 10:19 AM
  4. Can't set hostname.
    By WimG in forum Networking
    Replies: 5
    Last Post: 09-27-2003, 04:16 PM
  5. How do I change the hostname?
    By jensen in forum General Support
    Replies: 2
    Last Post: 07-18-2003, 10:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive picture

Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive

$259.99



Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture

Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot

$119.99



Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot picture

Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot

$219.99



4tb Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch Sata SSD For Laptop picture

4tb Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch Sata SSD For Laptop

$47.79



Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5

Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot

$15.50



Patriot P300 128G 256GB 512GB 1TB 2TB M.2 2280 PCIe Gen3x4 NVMe Internal SSD Lot picture

Patriot P300 128G 256GB 512GB 1TB 2TB M.2 2280 PCIe Gen3x4 NVMe Internal SSD Lot

$16.99



1080PRO 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk picture

1080PRO 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk

$28.99



SSD 512GB 1/2/4TB 870 EVO SATA III SSD 2.5'' Solid State Drive Upgrade PC Laptop picture

SSD 512GB 1/2/4TB 870 EVO SATA III SSD 2.5'' Solid State Drive Upgrade PC Laptop

$39.99



Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot picture

Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot

$109.99



SAMSUNG 2.5 in SSD 870 EVO 2TB 1TB 500 GB 250 GB SATA III Solid State Drive lot picture

SAMSUNG 2.5 in SSD 870 EVO 2TB 1TB 500 GB 250 GB SATA III Solid State Drive lot

$149.13