Mageia Bugzilla – Attachment 11708 Details for
Bug 26838
Bootloader not detected on non-volatile memory SSD drive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
test script
detect.pl (text/plain), 1.00 KB, created by
Martin Whitaker
on 2020-06-21 20:53:53 CEST
(
hide
)
Description:
test script
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2020-06-21 20:53:53 CEST
Size:
1.00 KB
patch
obsolete
>use lib '/usr/lib/libDrakX'; > >use common; >use bootloader; >use partition_table; >use Data::Dumper; > >my $s = cat_('/boot/grub2/install.sh'); >print "install.sh: $s\n"; > >my $bootloader = bootloader::read_grub2(); >print Dumper($bootloader); > ># handle raid-extra-boot (lilo) >my @devs = $bootloader->{boot}; >if ($bootloader->{'raid-extra-boot'} =~ /mbr/ && > (my $md = fs::get::device2part($bootloader->{boot}, $all_hds->{raids}))) { > @devs = map { $_->{rootDevice} } @{$md->{disks}}; >} elsif ($bootloader->{'raid-extra-boot'} =~ m!/dev/!) { > @devs = split(',', $bootloader->{'raid-extra-boot'}); >} >print Dumper(\@devs); > >my ($type) = map { > if (m!/fd\d+$!) { > print "floppy\n"; > } elsif (member($main_method, qw(cromwell uboot))) { > print "cromwell or uboot\n"; > } elsif (my $type = partition_table::raw::typeOfMBR($_)) { > print "MBR type = $type\n"; > } elsif (-e "/boot/refind_linux.conf") { > print "refind\n"; > } else { > print "unknown\n"; > } >} @devs; > >print "ok\n" if bootloader::read_($bootloader); >
use lib '/usr/lib/libDrakX'; use common; use bootloader; use partition_table; use Data::Dumper; my $s = cat_('/boot/grub2/install.sh'); print "install.sh: $s\n"; my $bootloader = bootloader::read_grub2(); print Dumper($bootloader); # handle raid-extra-boot (lilo) my @devs = $bootloader->{boot}; if ($bootloader->{'raid-extra-boot'} =~ /mbr/ && (my $md = fs::get::device2part($bootloader->{boot}, $all_hds->{raids}))) { @devs = map { $_->{rootDevice} } @{$md->{disks}}; } elsif ($bootloader->{'raid-extra-boot'} =~ m!/dev/!) { @devs = split(',', $bootloader->{'raid-extra-boot'}); } print Dumper(\@devs); my ($type) = map { if (m!/fd\d+$!) { print "floppy\n"; } elsif (member($main_method, qw(cromwell uboot))) { print "cromwell or uboot\n"; } elsif (my $type = partition_table::raw::typeOfMBR($_)) { print "MBR type = $type\n"; } elsif (-e "/boot/refind_linux.conf") { print "refind\n"; } else { print "unknown\n"; } } @devs; print "ok\n" if bootloader::read_($bootloader);
View Attachment As Raw
Actions:
View
Attachments on
bug 26838
: 11708