Changeset 2158


Ignore:
Timestamp:
Mar 5, 2009, 8:01:54 PM (11 years ago)
Author:
bruno
Message:
  • Fixes for ia64 support from Giuseppe Grassi <giuseppe.grassi2_at_italtel.it>:
    • the m) fake output is expected in fdisk.log so printing that on stdout instead of parted2fdisk log file
    • parted2fdisk supports now lack of partition given in 't' command
    • parted2fdisk supports now LVM type of partitions correctly (using a parted flag)
    • init links now /dev/tty to /dev/ttyS0 to have a working serial support on ia64
Location:
branches/2.2.9/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/parted2fdisk.pl

    r2154 r2158  
    7878        "reiserfs" => "83",
    7979        "linux-swap" => "82",
    80         "LVM" => "8e",
     80        "lvm" => "8e",
    8181        "" => "",
    8282    );
     
    210210                    print FLOG "n $l $part $cylstart $cylend => mkpart primary $start $end\n";
    211211                    system "$parted -s $device mkpart primary ext2 $start $end\n" if ($fake == 0);
    212                     print FLOG "command (m for help) send back to fake fdisk for mondorestore\n";
     212                    print "command (m for help) send back to fake fdisk for mondorestore\n";
    213213                } elsif ($i =~ /^d$/) {
    214214                    $part = <STDIN>;
     
    221221                    system "$parted -s $device rm $part\n" if ($fake == 0);
    222222                    get_parted($device,undef,\%start,\%end,undef);
    223                     print FLOG "command (m for help) send back to fake fdisk for mondorestore\n";
     223                    print "command (m for help) send back to fake fdisk for mondorestore\n";
    224224                } elsif ($i =~ /^w$/) {
    225225                    print FLOG "w => quit\n";
     
    231231                    }
    232232                    chomp($part);
    233                     $l = <STDIN>;
     233                    # If no partition number given it's 1, and we received the type
     234                    if ($part !~ /\d+/) {
     235                        $l = $part;
     236                        $part = 1
     237                    } else {
     238                        $l = <STDIN>;
     239                    }
    234240                    if (not (defined $l)) {
    235241                        print FLOG "no type given for tagging partition $part... skipping\n";
     
    241247                        next;
    242248                    }
    243                     print FLOG "t $part $l => mkfs $part $pnum{$l}\n";
    244                     system "$parted -s $device mkfs $part $pnum{$l}\n" if ($fake == 0);
    245                     print FLOG "command (m for help) send back to fake fdisk for mondorestore\n";
     249
     250                    if ($pnum{$l} eq "lvm") {
     251                        # In that case this is a flag set, not a mkfs
     252                        print FLOG "t $part $l => set $part $pnum{$l} on\n";
     253                        system "$parted -s $device set $part $pnum{$l} on\n" if ($fake == 0);
     254                    } else {
     255                        print FLOG "t $part $l => mkfs $part $pnum{$l}\n";
     256                        system "$parted -s $device mkfs $part $pnum{$l}\n" if ($fake == 0);
     257                    }
     258                    print "command (m for help) send back to fake fdisk for mondorestore\n";
    246259                } elsif ($i =~ /^a$/) {
    247260                    $part = <STDIN>;
     
    251264                    }
    252265                    chomp($part);
     266
     267                    # Partition shouldn't be negative or null. Then take the first one.
     268                    $part = 1 if ($part le 0);
     269
    253270                    print FLOG "a $part => set $part boot on\n";
    254271                    system "$parted -s $device set $part boot on\n" if ($fake == 0);
    255                     print FLOG "command (m for help) send back to fake fdisk for mondorestore\n";
     272                    print "command (m for help) send back to fake fdisk for mondorestore\n";
    256273                } elsif ($i =~ /^q$/) {
    257274                    print FLOG "q => quit\n";
     
    338355        "reiserfs" => "Linux",
    339356        "linux-swap" => "Linux swap",
    340         "LVM" => "Linux LVM",
     357        "lvm" => "Linux LVM",
    341358        "fat16" => "fat16",
    342359        "fat32" => "fat32",
  • branches/2.2.9/mindi/rootfs/sbin/init

    r2086 r2158  
    8181    # May avoid shell error messages
    8282    chmod 666 /dev/tty* /dev/console
     83    if [ "$ARCH" = "ia64" ]; then
     84        # Required to have a correct terminal or serial console support
     85        ln -s -f /dev/ttyS0 /dev/tty
     86    fi
    8387}
    8488
Note: See TracChangeset for help on using the changeset viewer.