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

Re: CF card for boot and binaries?



Hi Philippe

Thanks very much for your answer. Yes, this is an odd hybrid system!

In fact I have got quite far simply installing to disk and then copying
disk/boot to cf/boot and changing fstab and running grub again. The
kernel now boots off /dev/hdc1 (CF) while / is on /dev/hda2 (disk).

I would like to copy the minimum set of partitions to the CF card that I
need to boot the system if the hard disk fails. What are the minimum
set? I guess:

    /boot
    /    (because it points to boot to load the kernel?)
    /bin
    /sbin
    /etc
    /lib
    /root

Thanks for your notes about setting up swap and keeping /var on the HD.
I'm going to have to repartition and make all these partitions again, so
that I can have / on the CF card. I imagine I need / on the CF card so
that grub can find the symlinked kernels. Also, I have to install the
bootloader into the CF MBR...

Your comments on this strategy would be much appreciated.

Rory

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
########################################################################
# cf on hdc
/dev/hdc1       /boot           ext2
/dev/hdc2       /               ext3
/dev/hdc3       /bin            ext3
/dev/hdc4       /sbin           ext3
/dev/hdc5       /etc            ext3
/dev/hdc6       /lib            ext3
/dev/hdc7       /root           ext3
########################################################################
# disk on hda
# note: hda1-hda7 mirror /boot, /, /bin, /sbin, /etc/, /lib, /root above
/dev/hda8       none            swap    sw              0       0
/dev/hda9       /dev
/dev/hda10      /home
/dev/hda11      /mnt
/dev/hda12      /opt
/dev/hda13      /proc
/dev/hda14      /srv
/dev/hda15      /sys
/dev/hda16      /tmp
/dev/hda17      /usr
/dev/hda18      /var


On 18/11/04, Philippe De Swert (philippedeswert@pi.be) wrote:
> Hi Rory,
> 
> On Thu, 2004-11-18 at 01:57, Rory Campbell-Lange wrote:
> > Hi. Hope I'm posting to the right place!
> 
> Well maybe not for a full 100% because a mini-itx board with a CF of 512
> MB and loads of RAM is not necessarely what we would call an embedded
> system. But well in the end embedded debian should also be an answer to
> your problem. And you clearly did some research on this before posting,
> so this deserves an answer.
> 
> > Initial thoughts are to do a minimal netinstall of Debian, simply
> > mounting everything except /home on the CF card. I would set the system
> > to remount /var and /tmp on tmpfs and then restart the daemons noted
> > above so that they write their logs etc to the tmpfs.
> 
> Well do provide a swap on the HD, and also provide some space for var
> and tmp on that disk. You will not need that much for those, and enough
> space for that on a 80GB disk. (a few partitions totalling some 100 MBs
> should be enough) And a big home dir of course :-)
> 
> > (I wonder if the approach outlined in the DeveloperWorks article would
> > work -- see http://www-106.ibm.com/developerworks/library/l-fs3.html --
> > for instance issuing "mount tmpfs /tmp -t tmpfs -o size=64m" means that
> > all new writes will go to tmpfs instead of the (still existing) proper
> > /tmp device.)
> 
> Well it will certainly work. Even if you only boot from CF. The fstab
> entries for var, home or tmp will not be mounted, but not cause some
> horrible failure. Well you would lose access home access for your normal
> users, but it would definitely run.
> 
> > I am worried about doing this for the whole of var, however. Not only
> > could spool files for the printer devices not be lost unnecessarily
> > after an unexpected restart, but the Berkeley DB data required for the
> > netatalk shares (Apple file sharing) need to be kept in sync with the
> > shares in /home. Can I use the "mountpoint stack" method for tmpfs
> > filesystems for /var subdirectories -- say /var/mail specifically?
> 
> Well the tmpfs will eventually write stuff to swap. But a power failure
> would make you lose all data (or an ungraceful shutdown) Keep them on a
> partition on your disk.
> 
> I hope this was of any help. I do not really have experience in running
> systems that way. But that is how I would do it.
> 
> Regards,
> 
> Philippe
-- 
Rory Campbell-Lange 
<rory@campbell-lange.net>
<www.campbell-lange.net>



Reply to: