BTW, I'm not talking about a pickup line here :p
Sometimes, things happen to onboot.lst's. Seems like after updating deps and/or extensions, there are times we can no longer boot into a desktop.
I really needed to boot core64, however this morning happened and my test system would no longer boot to a desktop environment. Maybe a coincidence but I seem to recall running a system/dep update recently, so wondered if there's an issue here since the previous update was many many months ago.
So i grabbed an onboot.lst file from a similar yet working system, put it on a USBdrive and moved to the ill fated test machine.
While looking at both lists in the terminal I realist this was not going to be easy, to start with the list's were not in alphabetical order. I think a one liner could really help here.
So, what is it we need to accomplish??
We need to compare the two onboot.lst's and update the destination lst file as required from the source, easy huh?
First compare the two files and output any differences to terminal as we're just checking and don't know yet if there's an issue here.
for i in $(cat /mnt/sdb1/onboot_Core64.lst); do if grep -c $i /mnt/sdb1/onboot_Core64.lst; then sleep 1; else echo "${i}_missing"; fi; done
Ok so the result of this indicated several extensions where missing. Ok how to fix? Easy, we'll redirect the output of missing extensions to the suspect destination file.
We'll make a variable of path to the onboot.lst which needs updating since we may use it more than once.
dest="/mnt/sda2/tc7-x86/onboot64.lst"
then:
for i in $(cat /mnt/sdb1/onboot_Core64.lst); do if grep -c $i $dest; then sleep 1; else echo "$i" >> $dest; fi; done
success on reboot! I admit not pretty, but I luv it when a plan comes together.
Once again a "One liner" saves the day