From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZNuS-0002JN-Ih for mharc-grub-devel@gnu.org; Wed, 22 Jun 2011 09:56:00 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZNuP-0002IW-HJ for grub-devel@gnu.org; Wed, 22 Jun 2011 09:55:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZNuN-0001lQ-PD for grub-devel@gnu.org; Wed, 22 Jun 2011 09:55:57 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:43200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZNuN-0001lD-F4 for grub-devel@gnu.org; Wed, 22 Jun 2011 09:55:55 -0400 Received: by iyl8 with SMTP id 8so927750iyl.0 for ; Wed, 22 Jun 2011 06:55:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.152.72 with SMTP id h8mr761372icw.507.1308750953262; Wed, 22 Jun 2011 06:55:53 -0700 (PDT) Sender: schauba@g.clemson.edu Received: by 10.231.36.75 with HTTP; Wed, 22 Jun 2011 06:55:53 -0700 (PDT) In-Reply-To: References: Date: Wed, 22 Jun 2011 09:55:53 -0400 X-Google-Sender-Auth: 4LNTX_OCPyWKmSlaXYUDwUtAYOQ Message-ID: Subject: Re: Mounting a virtual hard-disk and booting from it From: Swapnesh Chaubal To: The development of GNU GRUB Content-Type: multipart/alternative; boundary=90e6ba6e87e6ab2ff304a64d53d2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 13:55:59 -0000 --90e6ba6e87e6ab2ff304a64d53d2 Content-Type: text/plain; charset=ISO-8859-1 Hey All, For some reason I'm not getting mails in grub-devel@gnu.org. Could someone kindly forward the replies to this id too? Thanks, Swapnesh On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal wrote: > Hey folks, > > I use a script from VMWare to read a virtual hard-disk and then mount it to > a drive in Linux. How can I boot from this mounted drive using grub (I need > to mount the drive before booting to any OS). I could have all the mounting > stuff written in a python/bash script. However, is there a way to run that > script from GRUB or a GRUB module? > > Thanks, > Swapnesh > --90e6ba6e87e6ab2ff304a64d53d2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey All,

For some reason I'm not getting mails in grub-devel@gnu.org. Could someone kindly forwar= d the replies to this id too?

Thanks,
Swapnesh

On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal <schauba@clemson.edu> wrot= e:
Hey folks,

I use a script from VMWare to read a virtual hard-disk an= d then mount it to a drive in Linux. How can I boot from this mounted drive= using grub (I need to mount the drive before booting to any OS). I could h= ave all the mounting stuff written in a python/bash script. However, is the= re a way to run that script from GRUB or a GRUB module?

Thanks,
Swapnesh

--90e6ba6e87e6ab2ff304a64d53d2-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZRjR-0007W6-JG for mharc-grub-devel@gnu.org; Wed, 22 Jun 2011 14:00:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:45930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZRjK-0007UW-PK for grub-devel@gnu.org; Wed, 22 Jun 2011 14:00:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZRjI-0006Bz-QP for grub-devel@gnu.org; Wed, 22 Jun 2011 14:00:46 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:53852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZRjI-0006Bi-2G for grub-devel@gnu.org; Wed, 22 Jun 2011 14:00:44 -0400 Received: from [127.0.0.1] (HSI-KBW-109-193-223-169.hsi7.kabel-badenwuerttemberg.de [109.193.223.169]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0M3uUc-1RPttD0XDO-00qoAg; Wed, 22 Jun 2011 20:00:33 +0200 Message-ID: <4E022DBD.8090004@rosenau-ka.de> Date: Wed, 22 Jun 2011 20:00:29 +0200 From: Martin Rosenau User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: The development of GNU GRUB , schauba@clemson.edu Subject: Re: Mounting a virtual hard-disk and booting from it References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------090006000501090809010707" X-Provags-ID: V02:K0:v0RASDJSNbUlkQNPl2Vf5FQtjTwRmsWNi2Uu1KdFFh2 qqxl5wkofIPnQyx6Gm8iET+/bvK5EgU62ZOS0YD7Dmygq5kJuU bW357KF/Ph8VDrMVwOOmq6EGL4sKRgHbnFFmjKHuBNX67h3M8S yhvWDbdlN+JBHfvWhEzMHe6Dtx/InJRfWtTRdGA0QFBvwqMibw OAz0C4deXbD8j+fXyxu5A== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.171 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 18:00:51 -0000 This is a multi-part message in MIME format. --------------090006000501090809010707 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello I do not think you can run Python scripts from GRUB. A Python interpreter is a very large program requiring a complete operating system. It would be very complex to run such scripts from GRUB... Martin > On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal > wrote: > > Hey folks, > > I use a script from VMWare to read a virtual hard-disk and then > mount it to a drive in Linux. How can I boot from this mounted > drive using grub (I need to mount the drive before booting to any > OS). I could have all the mounting stuff written in a python/bash > script. However, is there a way to run that script from GRUB or a > GRUB module? > > Thanks, > Swapnesh > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --------------090006000501090809010707 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello

I do not think you can run Python scripts from GRUB. A Python interpreter is a very large program requiring a complete operating system. It would be very complex to run such scripts from GRUB...

Martin

On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal <schauba@clemson.edu> wrote:
Hey folks,

I use a script from VMWare to read a virtual hard-disk and then mount it to a drive in Linux. How can I boot from this mounted drive using grub (I need to mount the drive before booting to any OS). I could have all the mounting stuff written in a python/bash script. However, is there a way to run that script from GRUB or a GRUB module?

Thanks,
Swapnesh

_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel

--------------090006000501090809010707-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZUB0-0003fV-BP for mharc-grub-devel@gnu.org; Wed, 22 Jun 2011 16:37:30 -0400 Received: from eggs.gnu.org ([140.186.70.92]:44139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZUAx-0003fJ-8t for grub-devel@gnu.org; Wed, 22 Jun 2011 16:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZUAv-00024M-SN for grub-devel@gnu.org; Wed, 22 Jun 2011 16:37:27 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:56643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZUAv-00024F-PO for grub-devel@gnu.org; Wed, 22 Jun 2011 16:37:25 -0400 Received: by iyl8 with SMTP id 8so1325799iyl.0 for ; Wed, 22 Jun 2011 13:37:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.62.200 with SMTP id y8mr928164ibh.89.1308775043391; Wed, 22 Jun 2011 13:37:23 -0700 (PDT) Sender: schauba@g.clemson.edu Received: by 10.231.36.75 with HTTP; Wed, 22 Jun 2011 13:37:23 -0700 (PDT) In-Reply-To: <4E022DBD.8090004@rosenau-ka.de> References: <4E022DBD.8090004@rosenau-ka.de> Date: Wed, 22 Jun 2011 16:37:23 -0400 X-Google-Sender-Auth: VnwXXyxyq9Pqhsnz7APQTakvS3M Message-ID: Subject: Re: Mounting a virtual hard-disk and booting from it From: Swapnesh Chaubal To: Martin Rosenau Content-Type: multipart/alternative; boundary=000e0cd4b40e8d5fe104a652ef1e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 20:37:28 -0000 --000e0cd4b40e8d5fe104a652ef1e Content-Type: text/plain; charset=ISO-8859-1 Thanks for the reply Martin, is there any other way to achieve this? I do not need to python script for it, I need to run an executable which reads the virtual hard-disk. So I think I'll need to run this executable and add an entry in grub.conf before the boot menu shows up. On Wed, Jun 22, 2011 at 2:00 PM, Martin Rosenau wrote: > ** > Hello > > I do not think you can run Python scripts from GRUB. A Python interpreter > is a very large program requiring a complete operating system. It would be > very complex to run such scripts from GRUB... > > Martin > > On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal wrote: > >> Hey folks, >> >> I use a script from VMWare to read a virtual hard-disk and then mount it >> to a drive in Linux. How can I boot from this mounted drive using grub (I >> need to mount the drive before booting to any OS). I could have all the >> mounting stuff written in a python/bash script. However, is there a way to >> run that script from GRUB or a GRUB module? >> >> Thanks, >> Swapnesh >> > > > _______________________________________________ > Grub-devel mailing listGrub-devel@gnu.orghttps://lists.gnu.org/mailman/listinfo/grub-devel > > > --000e0cd4b40e8d5fe104a652ef1e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for the reply Martin, is there any other way to achieve this? I do n= ot need to python script for it, I need to run an executable which reads th= e virtual hard-disk. So I think I'll need to run this executable and ad= d an entry in grub.conf before the boot menu shows up.



On Wed, Jun 22= , 2011 at 2:00 PM, Martin Rosenau <martin@rosenau-ka.de> wrote:
=20 =20 =20 =20
Hello

I do not think you can run Python scripts from GRUB. A Python interpreter is a very large program requiring a complete operating system. It would be very complex to run such scripts from GRUB...

Martin

On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal <schauba@clems= on.edu> wrote:
Hey folks,

I use a script from VMWare to read a virtual hard-disk and then mount it to a drive in Linux. How can I boot from this mounted drive using grub (I need to mount the drive before booting to any OS). I could have all the mounting stuff written in a python/bash script. However, is there a way to run that script from GRUB or a GRUB module?

Thanks,
Swapnesh

_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org<= /a> https://lists.gnu.org/mailman/listinfo/grub-devel


--000e0cd4b40e8d5fe104a652ef1e-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZVLc-0006U6-9v for mharc-grub-devel@gnu.org; Wed, 22 Jun 2011 17:52:32 -0400 Received: from eggs.gnu.org ([140.186.70.92]:38438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZVLZ-0006T5-AB for grub-devel@gnu.org; Wed, 22 Jun 2011 17:52:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZVLX-0006Iz-Hm for grub-devel@gnu.org; Wed, 22 Jun 2011 17:52:29 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:49446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZVLX-0006Ir-7L for grub-devel@gnu.org; Wed, 22 Jun 2011 17:52:27 -0400 Received: by wwf22 with SMTP id 22so1067679wwf.30 for ; Wed, 22 Jun 2011 14:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type; bh=zz0Qbqkbfx1P0lXz6Jew0TIHymwpqgs6jTQpw+j/Xws=; b=rEAMuY6KoeHpcdLXplgfJNO5cDxaSjgH/sSAU/At2F2jT2FvyV9gXa8Hnj1mmdHzw0 zs8tQFmEuztL5rRyVrkj3PC+SJfZLDhnVVqMnUZjj9CQFIX/g6N8HBua39YV+Hbnsq5k TrlmkScnh9+//35bNcZqLGqcTx3w4zCm5Q+ps= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=ZymSRFMiiUNpeToeIo86ngvUhRdtvZpLUEZ0qy+X7uMGKt5kgJwkniR8XhmjayBP5D rI5ijUqh88j4qaGjpsFjL/wcJC2DloWO2gyMmuOy5Taq0GqyEuV+P2mZjdN93RggXGvZ IafxD1rH8WDgjIRxkUJqi9kuRVG+cOYhMgOBw= Received: by 10.227.195.13 with SMTP id ea13mr1263561wbb.0.1308779545624; Wed, 22 Jun 2011 14:52:25 -0700 (PDT) Received: from debian.x201.phnet (5.90.202.62.cust.bluewin.ch [62.202.90.5]) by mx.google.com with ESMTPS id fr17sm760947wbb.40.2011.06.22.14.52.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Jun 2011 14:52:23 -0700 (PDT) Message-ID: <4E02640B.3070204@gmail.com> Date: Wed, 22 Jun 2011 23:52:11 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110606 Iceowl/1.0b2 Icedove/3.1.10 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: Mounting a virtual hard-disk and booting from it References: <4E022DBD.8090004@rosenau-ka.de> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigBB90FE827368F86F3950E314" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 21:52:30 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBB90FE827368F86F3950E314 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 22.06.2011 22:37, Swapnesh Chaubal wrote: > Thanks for the reply Martin, is there any other way to achieve this? I > do not need to python script for it, I need to run an executable which > reads the virtual hard-disk. So I think I'll need to run this > executable and add an entry in grub.conf before the boot menu shows up.= > Have a look at ubuntu/casper and http://www.supergrubdisk.org/wiki/Loopback.cfg to see how it's done properly. It short: you completely miss the point and "running a program/python script in GRUB" makes little sense. To load linux/initrd from image from GRUB it's enough 4 simple commands: loopback, linux, initrd, boot. But you need special initrd to do the rest > > > On Wed, Jun 22, 2011 at 2:00 PM, Martin Rosenau > wrote: > > Hello > > I do not think you can run Python scripts from GRUB. A Python > interpreter is a very large program requiring a complete operating > system. It would be very complex to run such scripts from GRUB... > > Martin > >> On Tue, Jun 21, 2011 at 3:02 PM, Swapnesh Chaubal >> > wrote: >> >> Hey folks, >> >> I use a script from VMWare to read a virtual hard-disk and >> then mount it to a drive in Linux. How can I boot from this >> mounted drive using grub (I need to mount the drive before >> booting to any OS). I could have all the mounting stuff >> written in a python/bash script. However, is there a way to >> run that script from GRUB or a GRUB module? >> >> Thanks, >> Swapnesh >> >> >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel > > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigBB90FE827368F86F3950E314 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAk4CZBMACgkQNak7dOguQgncIAEAxCB90oHkQL9D6YSYeXwldyDa ZIiMmDmAV/qSdxVoxekA/3egB/NX1zm3ryZhkRZQt6zTJusCx7Ov7Pna8zWqCNd2 =2Rjy -----END PGP SIGNATURE----- --------------enigBB90FE827368F86F3950E314-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1QZk9o-0000Cu-0a for mharc-grub-devel@gnu.org; Thu, 23 Jun 2011 09:41:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ6DK-0006YS-6G for grub-devel@gnu.org; Tue, 21 Jun 2011 15:02:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZ6DI-0004Ii-74 for grub-devel@gnu.org; Tue, 21 Jun 2011 15:02:17 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:59425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ6DH-0004ID-Q3 for grub-devel@gnu.org; Tue, 21 Jun 2011 15:02:15 -0400 Received: by iwn8 with SMTP id 8so82544iwn.0 for ; Tue, 21 Jun 2011 12:02:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.62.200 with SMTP id y8mr6329175ibh.89.1308682934137; Tue, 21 Jun 2011 12:02:14 -0700 (PDT) Sender: schauba@g.clemson.edu Received: by 10.231.36.75 with HTTP; Tue, 21 Jun 2011 12:02:14 -0700 (PDT) Date: Tue, 21 Jun 2011 15:02:14 -0400 X-Google-Sender-Auth: r7NU2u5pFuoKAIEsN3Abk29cfIE Message-ID: Subject: Mounting a virtual hard-disk and booting from it From: Swapnesh Chaubal To: The development of GNU GRUB Content-Type: multipart/alternative; boundary=000e0cd4b40e69b22f04a63d7d1e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.169 X-Mailman-Approved-At: Thu, 23 Jun 2011 09:41:18 -0400 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 19:02:21 -0000 --000e0cd4b40e69b22f04a63d7d1e Content-Type: text/plain; charset=ISO-8859-1 Hey folks, I use a script from VMWare to read a virtual hard-disk and then mount it to a drive in Linux. How can I boot from this mounted drive using grub (I need to mount the drive before booting to any OS). I could have all the mounting stuff written in a python/bash script. However, is there a way to run that script from GRUB or a GRUB module? Thanks, Swapnesh --000e0cd4b40e69b22f04a63d7d1e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey folks,

I use a script from VMWare to read a virtual hard-disk an= d then mount it to a drive in Linux. How can I boot from this mounted drive= using grub (I need to mount the drive before booting to any OS). I could h= ave all the mounting stuff written in a python/bash script. However, is the= re a way to run that script from GRUB or a GRUB module?

Thanks,
Swapnesh
--000e0cd4b40e69b22f04a63d7d1e-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Qa8al-0008Jw-4j for mharc-grub-devel@gnu.org; Fri, 24 Jun 2011 11:46:47 -0400 Received: from eggs.gnu.org ([140.186.70.92]:43830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa8ah-0008IB-MD for grub-devel@gnu.org; Fri, 24 Jun 2011 11:46:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa8ag-0002sT-1C for grub-devel@gnu.org; Fri, 24 Jun 2011 11:46:43 -0400 Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:58603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa8af-0002rj-8s for grub-devel@gnu.org; Fri, 24 Jun 2011 11:46:41 -0400 Received: by caffeine.csclub.uwaterloo.ca (Postfix, from userid 20367) id 8DC102822; Fri, 24 Jun 2011 11:46:39 -0400 (EDT) Date: Fri, 24 Jun 2011 11:46:39 -0400 To: The development of GNU GRUB Subject: Re: Mounting a virtual hard-disk and booting from it Message-ID: <20110624154639.GC7143@caffeine.csclub.uwaterloo.ca> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 129.97.134.17 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2011 15:46:45 -0000 On Tue, Jun 21, 2011 at 03:02:14PM -0400, Swapnesh Chaubal wrote: > I use a script from VMWare to read a virtual hard-disk and then mount it to > a drive in Linux. How can I boot from this mounted drive using grub (I need > to mount the drive before booting to any OS). I could have all the mounting > stuff written in a python/bash script. However, is there a way to run that > script from GRUB or a GRUB module? If you expect to do it from an unmodified virtual harddisk, then you can't. The software in it almost certainly will expect a real disk connected to some controller, which the virtual machine software provides. So you have to at least modify the image to work with a virtual drive directly. This means that it must have an initrd that can mount the real system's drive, find the virtual drive, loop mount that and make it root and continue booting. If you have such an initrd and kernel in the virtual drive, then grub (on the main drive of course, not inside the virtual drive since the host machine can't read that to boot) can loopback access the image and read the kernel and initrd and boot those, after which it is entirely up to the kernel and initrd to actually mount the virtual drive and use it. The image most likely must be a raw disk image (not .vdi, or .vmk or any of the other special virtual drive types that are not a stright collection of disk blocks in a file). Remember that once grub jumps to the kernel, nothing grub did exists anymore, so there is no concept of mounting a drive in grub and even if it could it wouldn't be mounted anymore as soon as you jump to the kernel. The kernel/initrd must do the mounting. -- Len Sorensen