[syslinux] Alternating boot default entry every reboot

Michael D. Setzer II mikes at kuentos.guam.net
Thu Oct 6 23:34:53 PDT 2016

On 7 Oct 2016 at 15:24, Brendon Costa via Syslinux wrote:

Date sent:      	Fri, 7 Oct 2016 15:24:08 +1100
To:             	syslinux at zytor.com
Subject:        	[syslinux] Alternating boot default entry every reboot
From:           	Brendon Costa via Syslinux <syslinux at zytor.com>
Send reply to:  	Brendon Costa <brendon.j.costa at gmail.com>

> Hi,
> I am currently using isolinux (syslinux-6.03) in a clonezilla setup. It
> boots fine, however I want to have a setup where the default boot selection
> alternates every boot.
> * First boot : Default is menu item 0
> * Second boot : Default is menu item 1
> * Third boot : Default is menu item 0
> ...
> The idea is that when it is booted into clonezilla the clonezilla script
> checks if the system needs to be restored by mounting NFS and checking for
> existence of a file. After clonezilla has restored it will reboot and then
> the isolinux will boot the native file system (Windows, OSX or Linux). Once
> the native OS has restarted, then isolinux will again boot clonezilla and
> the cycle continues every time you reboot.
> I have this clonezilla + isolinux installed on a bootable USB.

Don't fully understand the reason behind the process here?
So you always want it to boot from the usb, and the one option reimages the 
machine, and the other has it then boot from the hard disk? Any OS should 
be able to reset the boot flag for the USB.

Wondering if just changing the boot flag on the usb might be able to do it.
If the usb is bootable it loads the usb and runs the reimage, it not, it would go 
on to next boot option, which would be hard disk?

Years ago, had two labs in which we did something similar. We put image file 
on a 2nd partition, and machine would boot in morning via WOL, and would 
detect if it was first boot of day, and if so reimage the 1st partition, and then 
boot normally thruout the day. (Long ago with DOS and Ghost before 
Symantec bought it).

In my current classroom, I store image files on partition 8, and have an option 
on the grub menu to allow for reimaging the windows partition on machine, 
thou Linux is the default boot OS. Also, have linux patition images, but didn't 
add option to allow for auto reimage of linux partitions.  

I've maintained the G4L project since 2004, and it uses syslinux for the cd 
boot, but I've also used it directly from grub menu, and via grub4dos on 
windows systems. So, lots of options. I like having the images on the disk, 
since it cuts down network traffic. In classroom, create new images and then 
use udpcast to broadcast to all other machines one time, and then any 
imaging is local. 

Do note that booting for USB does have issues on machines, same usb 
works great on many machines, but others either don't have the boot from 
USB option, or don't work with some setups.

Hopefully, something works. 

Note: With grub2 booting from harddisk, it includes an option to just change 
the next boot, so I can set next boot for windows, but then the restart puts it 
back to the original default boot of linux.

Good Luck.

> I know this is possible with GRUB:
> http://unix.stackexchange.com/a/110539
> however from what I understand GRUB will not work correctly from the
> bootable USB on all hardware, which is why we use isolinux.
> 1) Is there any way I can achieve this currently in isolinux that I did not
> see looking at the docs?
> 2) If not, is this possible (obviously not possible for read-only CD, but
> bootable USB I imagine yes) and would a patch be welcome to support such a
> feature?
> Thanks,
> Brendon.
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux

  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes at kuentos.guam.net                            
  mailto:msetzerii at gmail.com
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

ABC         16613838.513356 | EINSTEIN   115111861.288695
ROSETTA     49762810.869403 | SETI        93224796.947871

More information about the Syslinux mailing list