diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-07-17 17:16:38 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-07-17 17:16:38 +0000 |
commit | f19d237b001786e4f0d5d511a03ca41cf422eb63 (patch) | |
tree | 2cfd4d56002715fa8ed1cb484b8b4d98361cf823 | |
parent | 233edb2d3618f22446540d378b545b63cdd5304d (diff) | |
download | drakiso-f19d237b001786e4f0d5d511a03ca41cf422eb63.tar drakiso-f19d237b001786e4f0d5d511a03ca41cf422eb63.tar.gz drakiso-f19d237b001786e4f0d5d511a03ca41cf422eb63.tar.bz2 drakiso-f19d237b001786e4f0d5d511a03ca41cf422eb63.tar.xz drakiso-f19d237b001786e4f0d5d511a03ca41cf422eb63.zip |
setup loop device with its real size (so that mkfs does not make a too large fs)
-rwxr-xr-x | draklive | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1298,9 +1298,11 @@ w EOF close($fdisk) or die "unable to run fdisk\n";; + my ($part_start, $part_nb_sectors) = run_program::get_stdout("sfdisk -d $dest") =~ /start=\s*(\d+),\s*size=\s*(\d+)/; + require devices; my $loop = devices::find_free_loop(); - run_('losetup', '-o', $track_size, $loop, $dest) + run_('losetup', '-o', $part_start * $sector_size, '-s', $part_nb_sectors * $sector_size, $loop, $dest) or die "unable to setup loop device"; device_mkfs($loop, get_media_setting($live->{media}, 'fs')) |