-
Senior Member
registered user
Is there a way to bash script a reboot with a cheatcode?
Is there a bash command that I can use in a script to shut down a LiveUSB
Knoppix session which is using persistence and automatically rebooting
that Knoppix with the cheatcode 'noimage', for example?
-
Of course, you can write such a script which manipulates '/mnt-system/boot/syslinux/syslinux.cfg'.
look with "grep" if 'syslinux.cfg' contains the word "noimage"; if not, insert it with "sed", else do nothing.
And you need the other way
look with "grep" if 'syslinux.cfg' contains the word "noimage"; if so, delete it with "sed", else do nothing.
But why expend so much time to develop such a script; it's easier to work on 'syslinux.cfg' with mcedit or leafpad if you really need it some time.
-
Senior Member
registered user
An alternative, and for me simpler, approach is to use a bootloader. I use old legacy GRUB, and there you can easily use a noimage boot alternative as the default. Which of course lets you override that manually. If you want a flip mechanism, you may set and manipulate the default alternative, principally the same way as Werner describes with syslinux boot.
-
Senior Member
registered user
Greetings, Werner & Capricorny.
Thank you both for your suggestions.
I have implemented a workable manipulation of the DEFAULT line in
syslinux.cfg adequate to my purposes.
I now have a working bash script to facilitate stacking compressed
images ala Klaus K's CeBIT scheme.
I also found Werner's menu management scheme of organization and use
of 'dialogs' very useful to build upon.
After I use this a while to catch some of my errors, I'll post it
for your comments.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Crucial MX500 500GB 2.5" SATA III Internal SSD CT500MX500SSD1
$53.99

SSD 880EVO SATA III 2.5 4TB INTERNAL STATE DRIVE
$214.99

Samsung 860 EVO 250GB SSD MZ-76E250 2.5" SATA III Solid State Drive
$39.99

Ediloca 128GB SATA III SSD 2.5 Inch Internal Drive for PC & Laptop
$73.99

Netac 2TB 1TB 512GB 256GB Internal SSD 2.5inch SATAIII Solid State Drive lot
$549.00

SAMSUNG SSD 512GB 500GB 480GB 256GB 250GB 240GB SSD 2.5 Solide State Drive 6Gbps
$37.99

Fanxiang 1/2/5/10Pcs 2.5'' SATA SSD Lot 1TB 2TB 4TB 512GB 256GB TLC Internal SSD
$129.99

2 PACK 128 GB SSD M.2 2280 SATA Solid State Drive Major Brands, Samsung, LiteON
$28.80

Micron MTFDDAK256TBN 256 GB, Internal ,2.5" SSD
$23.00

Netac 120GB 256GB 1TB 2TB Internal SSD 2.5'' SATAIII 6Gb/s Solid State Drive lot
$119.99