darkspellx / inxi

Automatically exported from code.google.com/p/inxi
0 stars 0 forks source link

boot loader information option #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
A user asked me about adding grub detection, ie, to locate which partition or 
disk grub was installed on, thinking I assume only of his single disk system 
with a few partitions, but just to have this issue reported I'm creating this 
issue here.

http://forum.siduction.org/index.php?topic=4390.0

Re grub detection, once you expand the use case to cover everything possible, 
here's what is actually roughly required:

Detect all bootlloaders, grub, lilo, and whatever else is used on unix/linux.

handle uefi, which requires all permutations of that possible setup and data 
sets.

locate root partition, check that partition for boot loader.

locate drive id, like /dev/sda, query that. Query all other drives located to 
discover all other boot loader instances.

Since the main bootloader can be on another drive, and boot the partition 
either using the partition boot, or a direct connection to the kernel image 
thing from the primary grub/lilo whatever, the possibities are somewhat 
staggering, and would require learning exactly how all types of uefi boot 
implementations can be detected and handled, all types of boot loaders, all 
partition and main boot sectors, etc. Scary stuff. My experience with inxi is 
that once you expand the features to cover most possible scenarios, you're 
talking about a minimum of 2 weeks of research and development, followed by at 
least 2 more weeks of fringe case handling and issues. In other words, it would 
be a major feature, not a trivial thing to do, so I'll wait for a patch for the 
get_bootloader_data function, I'll handle the print bootloader stuff because 
it's very picky and hard to understand.

Patch would need to include all possible scenarios, raid boot, uefi, all boot 
loaders, multi disk systems, systems with multiple instances of bootloaders, 
etc. I suggest filing an issue report on inxi wiki, it will stay up a long time 
but might at some date be done if I feel the need to actually have that data, 
just as the ram issue report stays until it gets done one day.

Note that as with ram/memory item, this currently would require root to run it, 
which makes it a highly non desirable item, anything that can point to how to 
get this type of data without root will escalate the feature consideration 
radically, as will any crude patch. A patch merely should print lines of the 
data, usually inxi internally creates pseudo multidimensional arrays, ie, 
primary uses line breaks to separate array values, and secondary uses something 
like csv formatting to hold each line's array data, so that's the desired 
output more or less. Note that the attached shows things like NTFS too, so it 
needs to handle all major OS bootloaders as well, windows, osx, etc.

I'm not likely to do this ever, but I'm posting an issue to record the idea.

Original issue reported on code.google.com by inxi-...@techpatterns.com on 5 Apr 2014 at 7:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by inxi-...@techpatterns.com on 5 Apr 2014 at 7:11

GoogleCodeExporter commented 9 years ago

Original comment by inxi-...@techpatterns.com on 5 Apr 2014 at 7:14