⬆️ ⬇️

Booting c iso images with memdisk and grub4dos

You've probably heard about such devices as a netbook. And you know that they do not provide an optical drive (CD \ DVD).

By purchasing a netbook, I ran into a problem - I needed to pay another $ 60 for an external optical drive, which was a little expensive for a poor student in a crisis. The device flatly refused to boot from the flash drive from the card (why - I still do not understand ...) and then the thought occurred to me: "And if you boot from the image?" - so the search began ...



Next, I suggest reading how I solved the problem with grub4dos and memdisk. The ultimate goal is to download the openSUSE 11.3 netinstall image.





Immediately make a reservation:

Not all images can be downloaded as described (I never managed to install WinXP).

The image is mounted in the RAM and therefore large images cannot be mounted in this manner.

This is not the only way to download iso content - you can copy the kernel and all the necessary resources to disk and load the resulting structure, but this method requires an understanding of how the installer works and is not always feasible.

')

Step One: Preparation



I got a netbook with Windows XP preinstalled, so the whole thing is based on having Win XP installed.

I used grub4dos, although everything stated in this article is applicable to the usual GRUB (at the moment everything is working on the usual).

We need one partition with a file system supported by the loader (any other than NTFS).

* I used FAT32, but ext2 \ ext3 will do.

We copy on our section an image.



Step Two: Install grub4dos



We read the documentation or the continuation of the article;)

Download grub4dos from here .

Unpack the archive, copy grub4dos - * \ grldr to the root directory of the system disk (usually - C: \, then -% sysdisk%); open% sysdisk% \ boot.ini and append it to the [operating system] section

C:\grldr="Grub4Dos"

The address “C: \ grldr” should be used even if the installed OS has a different drive letter.

* The documentation describes installation on a more modern bootloader.

Something will turn out like:

[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

C:\grldr="Grub4Dos"



The contents of the grub4dos- folder * add to% sysdisk% \ Grub4Dos

The config from% sysdisk% \ Grub4Dos \ MENU.LST is shifted to% sysdisk% \ MENU.LST

* It is important to understand that grub4dos initially tries to read (hd0,0) \ MENU.LST, therefore it is better to either use the --config-file=%CONFIG% key or put MENU.LST in the root of the section (hd0,0). Usually this is C: \ or / dev / sda1

** It is also important to understand how GRUB numbers the disks, you can read about it either in the official or in the translated documentation.

*** According to the documentation, there is another option that provides for configuring the config in the key --config-file =% CONFIG% as follows --config-file="find --set-root /openSUSE-11.3-NET-i586.iso; kernel /memdisk iso raw; initrd /openSUSE-11.3-NET-i586.iso" but for some reason I don’t want to work this way (probably due to the fact that the regular GRUB is registered in the MBR).



Step Three: memdisk



You have 2 options: download syslinux and build memdisk yourself or download the memdisk I collected from dropbox .

Memdisk is saved on the partition with the image (for simplicity).

* Generally speaking, we can keep the image and memdisk on different partitions, but then we have to use the absolute path to memdisk (or the image, which is less likely).



Step Four: Setup



Open% sysdisk% \ MENU.LST

Add a block there (openSUSE-11.3-NET-i586.iso - image name)

title boot an image with memdisk

find --set-root /openSUSE-11.3-NET-i586.iso

kernel /memdisk iso raw

initrd /openSUSE-11.3-NET-i586.iso



Save, reboot ... The standard bootloader (ntldr) with 2 options is loaded - load Windows or load Grub4Dos.

We load the last one and see how our image is loaded.



Alternative option



There is another way to mount iso in Grub4Dos: add it to% sysdisk% \ MENU.LST

title boot an image with memdisk

find --set-root /openSUSE-11.3-NET-i586.iso

map /openSUSE-11.3-NET-i586.iso (0xff) || map --mem /openSUSE-11.3-NET-i586.iso (0xff)

map --hook

Source: https://habr.com/ru/post/111045/



All Articles