The Big Merge - Welcome SystemBoot#1255
Conversation
Adding .stickler.yml configuration file
Grub2 supports quoting. I have introduced minimal unquoting with this patch to support dollar-sign for variable expansion. https://www.gnu.org/software/grub/manual/grub/grub.html#Quoting
Implemented a simple VPD library, using the sysfs interface at /sys/firmware/vpd . See https://chromium.googlesource.com/chromiumos/platform/vpd/ for details. There are three methods, Get, Set, and GetAll. Unfortunately Set doesn't currently work, because the sysfs interface does not support writing. To write, this library needs a backend able to write to flash chips, like the command line tool flashrom[1] or flashtools[2]. [1] https://www.flashrom.org [2] https://github.com/osresearch/flashtools
Redesigned to have a TPM interface and TPM1 and TPM2 implementations
created tpm.Info, refactored around it. Fixed potential FD leak
Also use Run instead of Start + Wait Signed-off-by: Andrea Barberio <[email protected]>
Signed-off-by: Yaroslav Kolomiiets <[email protected]>
fixmynetboot is now part of the netboot workflow. It is called automatically if netboot fails, if speficied in the VPD variables, or if `-fix` is passed. Also corrected error handling logic in checker and restructured command execution. Signed-off-by: Andrea Barberio <[email protected]>
Signed-off-by: zaolin <[email protected]>
Signed-off-by: zaolin <[email protected]>
Signed-off-by: Jens Drenhaus <[email protected]>
localboot: add config flag to select bootconfig
…leep behavior Signed-off-by: tfg13 <[email protected]>
uinit: Add interactive mode
* localboot: add multiboot support Enables localboot to handle multiboot menu entries using kexeec support for multiboot Signed-off-by: Jens Drenhaus <[email protected]> * review fixes Signed-off-by: Jens Drenhaus <[email protected]> * review: rework ScanGrubConfigs Signed-off-by: Jens Drenhaus <[email protected]> * fix bootconfig struct tag Signed-off-by: Jens Drenhaus <[email protected]> * review: add safeguard to recursive grub.cfg search Signed-off-by: Jens Drenhaus <[email protected]> * localboot: add multiboot support Enables localboot to handle multiboot menu entries using kexeec support for multiboot Signed-off-by: Jens Drenhaus <[email protected]> * initial draft, support for vfat and ext4 Signed-off-by: Jens Drenhaus <[email protected]> * add config flag to selct bootconfig Signed-off-by: Jens Drenhaus <[email protected]> * fix rebase Signed-off-by: Jens Drenhaus <[email protected]> * rework bootconfig.go due to new mulitboot interface Signed-off-by: Jens Drenhaus <[email protected]> * fix rebase Signed-off-by: Jens Drenhaus <[email protected]> * localboot/grub.go: rework fsuuid validation Signed-off-by: Jens Drenhaus <[email protected]> * localboot/grub.go: reset kernelBaseDir for every grub menuentry Signed-off-by: Jens Drenhaus <[email protected]> * rework measurement of bootconfigs Signed-off-by: Jens Drenhaus <[email protected]> * clean up comments Signed-off-by: Jens Drenhaus <[email protected]> * crypto: remove TryMeasureBootconfig() Signed-off-by: Jens Drenhaus <[email protected]> * storage/blockdev.go: fix PartitionsByFsUUID Signed-off-by: Jens Drenhaus <[email protected]>
localboot -> cmds/boot/localboot netboot -> cmds/boot/fbnetboot uinit -> cmds/boot/uinit cmds/fixmynetboot -> examples/fixmynetboot cmds/vpdbootmanager -> tools/vpdbootmanager Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
Signed-off-by: Chris Koch <[email protected]>
The "boot" template just includes all bootloader commands. The "systemboot" template includes a uinit that automatically does fbnetboot and localboot. Signed-off-by: Chris Koch <[email protected]>
| if err := cmd.Run(); err != nil { | ||
| log.Printf("Error calling fixmynetboot: %v", err) | ||
| log.Print("fixmynetboot failed. Check the above output to manually debug the issue.") | ||
| os.Exit(1) |
There was a problem hiding this comment.
for later, but we could probably just use log.Fatalf for this sort of case.
| if sline[0] == "search" { | ||
| for _, str1 := range sline { | ||
| if str1 == "--set=root" { | ||
| log.Printf("Kernel seems to be on an other partitioin then the grub.cfg file") |
There was a problem hiding this comment.
for later, fix spelling of partition.
| ) | ||
|
|
||
| // TODO backward compatibility for BIOS mode with partition type 0xee | ||
| // TODO use a proper parser for grub config (see grub.go) |
There was a problem hiding this comment.
a proper grub parser is ... a lot. it's just about a programming language. I would rather argue that we should stick with simple grub, since the inventor of the grub configuration language doesn't like it.
There was a problem hiding this comment.
yeah, we eventually decided to stay with a simple grub parser, it's really too much to handle, especially being a "transition" boot mode
| @@ -0,0 +1,47 @@ | |||
| // Copyright 2017-2019 the u-root Authors. All rights reserved | |||
There was a problem hiding this comment.
we probably ought to create an 'ansi' package, as this could be more useful than just in here.
| "github.com/rekby/gpt" | ||
| ) | ||
|
|
||
| var ( |
There was a problem hiding this comment.
to do: all this needs to be either // +build linux OR variables like this could go into a blockdev_linux.go file
| "strconv" | ||
| "strings" | ||
|
|
||
| "github.com/rekby/gpt" |
There was a problem hiding this comment.
I think I wrote this before the u-root gpt package (and if not, I probably just didn't see it)
| return uuid | ||
| } | ||
|
|
||
| // GetGPTTable tries to read a GPT table from the block device described by the |
There was a problem hiding this comment.
GPT means GUID Partition Table, so GPTTable means ... GUID Partition Table Table :-)
Merges the entire http://github.com/systemboot/systemboot repo into u-root, as discussed offline.
Sorry, had to redo this since u-root made some changes at master and merging didn't work for GitHub. (Independent trees are probably not a use case they see often...)