[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cleaning DHCP and Host Info for New LAN



On Feb 17, 2011, at 6:40 AM, Bob wrote:

> On 02/17/2011 12:24 PM, Hal Vaughan wrote:
>> On Feb 16, 2011, at 10:22 PM, Bob wrote:
>>> On 02/17/2011 06:38 AM, Hal Vaughan wrote:
> 
> 8< snip system image pushed onto a CF card
> 
>>> rm -f /mnt/src/etc/udev/rules.d/70-persistent-net.rules
>>> rm -f /mnt/src/etc/udev/rules.d/70-persistent-cd.rules
>> 
>> Thanks for this one -- I don't have the cd.rules, but do have the net.rules and that would cause problems because of the different MAC addresses.  Will the net.rules one be regenerated on boot if it doesn't exist?
> 
> Yes.
> 
> If you want a portable system where the LAN is always eth0 then you want to stop those files being generated,
> chmod -c 644 /lib/udev/write_*
> will do that but I get the impression with your project once the image is flashed onto a card it won't be moved that much.

No, it won't be.

In short, I'm working with a Soekris net5501, 512MB, 512Mhz with a slot for CF cards, a USB port, and an IDE port and PCI slot, but I'm not using IDE or PCI.  I'm using the one I have now to develop the system and in the long run, I'll have several of these, each one going into a different office, which means different LANs.  Once I get the image the way I want it on this CF card, I'll copy it and use it for other CF cards.  When it's time to make a new unit, I'll copy the OS image onto a CF card, put that in the box, then put a USB RAM drive in.  It'll find the file update.tgz, unpack it, and run a file within it.  That file will use apt to first update the system, then add on more packages, and finally install the software I'm writing.

So once I have a new CF card, it'll stay in one system and won't move at all, but the system will be put on a different LAN.

>>> rm -f /mnt/src/var/lib/ntp/ntp.drift
>> 
>> Not even on this system.  I will be installing ntp, but at a later stage.
> 
> With my system images I try to configure as much as possible before I take the image & as I have an NTP server on my firewall I like all my internal machines to sync off that which requires editing /etc/ntp.conf so I do it before and have the big block of commands I'm pasting onto a shell prompt sort it out for me.  A lot of it's over kill, only some of my system images have swap file installed but it doesn't hurt to try & delete a non-existent file & this way the text file from which I paste the commands is more general.

I'm using a minimal image on the CF card because I don't want to be changing the along the way, I want it stable and static.  The install program in update.tgz will be where all the other configuration happens, since it'll be easier to make changes there and just re-tarball that image when I need to.

Normally I'd agree with you and want the image to be as complete as possible.  In this case, I think you could say I'm working with two images, the first is the one that goes onto the CF card and the other is the one including the update program and that's the one that will be complete when it's done.

> I can role out a nicely configured functional desktop image onto a harddrive, flash card, or USB stck in under 10 minutes which is very handy, after that all the system needs is updating (I have an apt-proxy so that's bloody quick) & my friends old tired pox ridden winblows box is a sprightly Squeeze workstation.

I can see how that would be quite useful, but other than these small embedded systems, I am not doing much in terms of installing or creating new systems.  I use an iMac for my desktop now and my servers are on Linux.  I also have a number of VMs under Parallels for work and on the last one, which was Squeeze, I just told Parallels where the iso was and it did the rest automatically.  But VMs do have a lot of advantages over building something on new hardware.

>>> rm /etc/ssh/ssh_host_*
>>> dpkg-reconfigure openssh-server
>> 
>> Almost all the ssh files will be re-configured, replaced, or deleted by the install program.  I had not thought of reconfiguring.  If the other files are deleted, what else does reconfiguring the ssh server do?  (I'm actually considering not installing ssh until the update phase, since that'll force a new config for each system.  But without ssh, if anything goes wrong, it's a pain to have to find the USB-serial adaptor and the cable and hook it all up to log in.)
> 
> I do it to generate new keys it may not be the most elegant way but it works.

Quick and simple, though.  I like that because it eliminates work.

>>> After that it's mainly hardware specific stuff.
>> 
>> Hardware isn't a real issue, other than MAC addresses, since I'm using a system where the board hasn't changed in a while and likely won't change for a good while, at least  it likely won't change as long as I'm involved with this.  So one system should look just like the rest hardware wise.
> 
> That helps a lot, the 10 minutes quoted above doesn't take into account bullying ALSA to play nice and use the USB webcam mic by default etc..

Don't get me started on ALSA.  That's one reason my desktop isn't Linux.  (But I did use a Linux desktop for close to 10 years -- had to change for several reasons, including a need to be able to do video editing without spending hours fiddling with importing camcorder file formats.  Also, sound was ALWAYS an issue, in ALSA and otherwise.)



Hal

Reply to: