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

Setting bootable flag on partition non-interactively.



Hello all,

Any suggestions on how to set a bootable flag non-interactively?



Reason:

I am creating a kiosk that restores itself from a saved image every time
the machine is booted.  This system is very minimal; the partitions are
quite small.  The image of the 2nd partition is stored as a file on a 3rd
partition.

I envision the machine completing these steps.
1.  Boot from 1st partition.
2.  Do housekeeping (i.e. run dd to restore a partition saved as a file on
a 3rd partition.)
3.  Set 2nd partition as bootable, 1st partition as non-bootable.
4.  Reboot, It boots from 2nd partition.
5.  Set 1st partition as bootable, 2nd partition as non-bootable.
6.  User operates kiosk using 2nd partition until it is shutdown.

This is actually a kiosk that keeps a partition image on a 3rd partition. 
This image is restored to the 2nd partition.  This ensures the system is
consistent every time the employee boots the computer.

Caveats:

*  Is it damaging to toggle the bootable flag on a partition that is
currently mounted, or merely 'impolite' (i.e. bad practice)?


Tim Legg


Reply to: