Fix mtab creation for grub installation.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 23 Jul 2010 15:40:53 +0000 (17:40 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 23 Jul 2010 15:40:53 +0000 (17:40 +0200)
src/install+setup/install/main.c

index ccb5264..9cf1bd5 100644 (file)
@@ -542,7 +542,7 @@ int main(int argc, char *argv[])
        replace( "/harddisk/boot/grub/grub.conf", "root=ROOT", string);
        mysystem("ln -s grub.conf /harddisk/boot/grub/menu.lst");
 
-       system("sed -e 's#harddisk\\/##g' < /proc/mounts > /harddisk/etc/mtab");
+       system("sed -e 's#/harddisk#/#g' -e 's#//#/#g'  < /proc/mounts > /harddisk/etc/mtab");
 
        snprintf(commandstring, STRING_SIZE, 
                 "/sbin/chroot /harddisk /usr/sbin/grub-install --no-floppy %s", hdparams.devnode_disk);