Re: loopmounting during kickstart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 4, 2011 at 8:10 PM, Tirtha Chatterjee
<tirtha.p.chatterjee@xxxxxxxxx> wrote:
> Hi, I am trying to create something for Fedora like Wubi does for
> Ubuntu -- allow users to install Fedora from inside windows by
> loopmounting a file on a windows partition as a drive while using
> Fedora.
> Can anyone tell me if this snippet can be used to make anaconda
> install Fedora to a file on a windows partition?
>
> %pre
> #!/bin/bash
> #----------------------------------------------------------------------------------------
> # Mount windows drive
> mkdir -p /tmp/windows
> mount /dev/sda2 /tmp/windows
>
> loop_root=`losetup -f`
> losetup $loop_root /tmp/windows/virtual.disk.root
>
> loop_swap=`losetup -f`
> losetup $loop_swap /tmp/windows/virtual.disk.swap
>
> loop_boot=`losetup -f`
> losetup $loop_boot /tmp/windows/virtual.disk.boot
>
> echo "part /boot --fstype ext4 --size 512 --ondisk $loop_boot" >>
> /tmp/part-include
> echo "part / --fstype ext4 --size 10000 --grow --ondisk $loop_root" >>
> /tmp/part-include
> echo "part swap --recommended --ondisk $loop_swap" >> /tmp/part-include
> #----------------------------------------------------------------------------------------
> %end
>
> %post
> #!/bin/bash
> #----------------------------------------------------------------------------------------
> losetup -d $loop_root
> losetup -d $loop_swap
> losetup -d $loop_boot
>
> umount /dev/sda2
> rm -Rf /tmp
I meant
rm -Rf /tmp/windows
> #----------------------------------------------------------------------------------------
> %end
>
> #blah blah blah
>
> %include /tmp/part-include
>
> #blah blah blah
>
>
> Please let me know if this will work, or any changes that need to be
> done. In addition, it would be really nice if you suggest me a way of
> testing if this works, and point me to some directions on creating
> ISOs with my own kickstart files.
>
> --
> Regards
> Tirtha Chatterjee
> http://wyuka.co.cc/



-- 
Regards
Tirtha Chatterjee
KDE developer
http://wyuka.co.cc/

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux