Install from hard drive partition
Has anyone perfected the art of universal install of distros from a hard drive partition?
I have tried the approach explained here, but not working for me. I have only tried this approach with absolute linux, but I get through the installation process, but after it says it is complete, it didn't actually install anything. Absolute Linux is Slackware based so wondering if that may be a problem.
I'm wondering if I need to know a more descriptive information about bzImage and initrd than what's shown in the how-to link above.
I am using GRUB2 as well and followed the manual for GRUB2 as that how-to doesn't actually explain the correct approach with GRUB2.
Here is what I imput:
recordfail
insmod part_msdos
insmod vfat
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 8420-4672
linux /bzImage root=UUID=8420-4672 rw quiet splash
initrd /initrd.img
}
The files were put into the root of a separate partition by themselves (/dev/sda3). 3 files, the iso image, bzImage and initrd.img. However, this approach is not working.
I haven't seen any other sites or explanations on this subject, but I am sure there is some kind of hack for this.
Comments
I am questioning where you state that it did not install the files, does that mean that you got through the installer, but upon reboot no files were written to disk? If that is the case are you sure that you chose to install the files on a newly formatted ext3, ext4 or reiserfs partition on the physical hard drive?
Upon installation completion, I already knew it wasn't complete becuase it took less than a second. However, when I mounted the installed partition, the only thing that was put into the partition was the iso image and /var directory with more empty directories:
Since you use grub legacy successfully, I may just create a dedicated grub legacy partition and flag it for boot and grub mbr the boot for that partition when I do installs.
Is there a tutorial on how you install from hard disk with the help of usb boot image?
By what I have seen of your configuration file and the outcome, it sounds like the package installation portion did not correctly find and read from the package list. Did you write the packages from the installation disk to the HDD or try to access them via a mounted loop to use the iso?
[ul][li]Download the usbboot image from ftp://slackware.osuosl.org/pub/slackware/slackware-13.1/usb-and-pxe-installers/usbboot.img.[/li]
[li]mount it to /mnt/tmp with the command "mount -o loop usbboot.img /mnt/tmp/"[/li]
[li]create a directory in your boot partition for the new files, I called it s-recover, "mkdir /boot/s-recover"[/li]
[li]copy the files from the usbboot mounted directory into the new directory, "cp /mnt/tmp/* /boot/s-recover"
The contents of the image are:
-rwxr-xr-x 1 root root 653 2010-11-26 21:53 f2.txt*
-rwxr-xr-x 1 root root 5689312 2010-11-26 21:53 huge.s*
-rwxr-xr-x 1 root root 14060973 2010-11-26 21:53 initrd.img*
-r-xr-xr-x 1 root root 14998 2010-11-26 21:53 ldlinux.sys*
-rwxr-xr-x 1 root root 569 2010-11-26 21:53 message.txt*
-rwxr-xr-x 1 root root 2823 2010-11-26 21:53 setpkg*
-rwxr-xr-x 1 root root 5720656 2010-11-26 21:53 speakup.s*
-rwxr-xr-x 1 root root 313 2010-11-26 21:53 syslinux.cfg*[/li]
[li]Make an entry into menu.lst for the new boot option, using the kernel and initrd image from the usbboot image: [/li][/ul]
Slackware allows installation from network, so I just use the network install option and point to my local mirror for the sources, but you can choose to extract the files from the installation disk into a directory, or use a mount by loopback to read the iso image and install completely from disk.
After your comment I went back to look at my approach.
I then added the mount loop. I used -o loop to mount my iso file on /mnt/isotemp, then copied the directories containing bzImage, initrd, and the package directory, (absolute) to my mounted installation source partition.
Then at the installation process, it dawned on my that I had been pointing the installer to my iso file instead of the distro package directory (absolute). So I pointed the installer to my package directory and the installation succeeded.
It turns out that Slackware based distros as Absolute Linux is, are the easiest to install with this method.
When I "ls -l" the directory after "mount -o loop /data/OS/absolute-13.6.1.iso /mnt/isotemp/" I find that the files are all read&write which allows me a simple install. However when mounting non-Slackware based distros, the files are all read-only, and the package that I must point the installer to are images instead of files.
I mounted Zenwalk, another Slackware distro, and it is read-write as well and should have no problems installing with this method.
I am working with non-Slackware distros to see if this will work universally as Slackware has already proven to be successful with this method. For the read-only distros I can copy over the files from the mounted directory with "cp -r <source files> /<target directory>", however, I still have the problem of dealing with images instead of files.
As an update, my current non-Slackware distro boots to it's screen but after a couple seconds fails to this message:
According to /mtab, /dev/sda7 is already mounted on /sysroot. Already mounted or /sysroot is busy. Then follows with "Unable to mount root files system".
However, my image and initrd is pointed to the correct files:
Also /dev/sda7 doesn't have an /mtab as it is only holds my isos, so I checked my distro holding grub, and /mtab doesn't show /dev/sda7, nor does /fstab.
I will continue to rummage around until I figure something out.
Try changing the bootloader lines to remove the partition reference so that the image is loaded into RAM and /dev/sda7 is unused and waiting to be manually mounted for use.
for what you are trying to accomplish look into the loopback option in grub2 which ideally should allow you to just mount an iso from the bootloader, I will try it myself and cover it in my tutorials.