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 have had no issues installing Slackware from hard disk via grub(legacy) using the files from the usbboot image, so the Slackware part of your message is incorrect.
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?0 -
The installation was to a partition with ext3.
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:[root@linwalker ~]# mount /dev/sda1 /mnt
[root@linwalker ~]# cd /mnt
[root@linwalker mnt]# ls -l
total 24
drwxr-xr-x. 2 root root 4096 Nov 24 06:02 iso
drwx
. 2 root root 16384 Nov 24 06:01 lost+found
drwxr-xr-x. 3 root root 4096 Nov 24 06:01 var
[root@linwalker mnt]# ls -l /mnt/var
total 4
drwxr-xr-x. 3 root root 4096 Nov 24 06:01 log
[root@linwalker mnt]# ls -l /mnt/var/log
total 4
drwxr-xr-x. 3 root root 4096 Nov 24 06:01 setup
[root@linwalker mnt]# ls -l /mnt/var/log/setup
total 4
drwx
. 4 root root 4096 Nov 25 06:03 tmp
[root@linwalker mnt]# ls -l /mnt/var/log/setup/tmp
total 16
-rw-r--r--. 1 root root 9 Nov 24 06:02 return
drwxr-xr-x. 2 root root 4096 Nov 24 06:03 series
drwxr-xr-x. 2 root root 4096 Nov 24 06:03 tagfiles
-rw-r--r--. 1 root root 643 Nov 24 06:02 tempscript
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.I have had no issues installing Slackware from hard disk via grub(legacy) using the files from the usbboot image0 -
The steps I took to use legacy grab are pretty much the same, however it appears that I cannot find the tutorial anymore, I may have to write it up myself.
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?0 -
No guide was available for the grub(legacy) method so, here you are (for slackware).
[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:title Slack-recover root (hd0,1) kernel /boot/s-recover/huge.s ro initrd /boot/s-recover/initrd.img
[/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.0 -
Success!
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:menuentry 'Install Fuduntu (/dev/sda7)' { recordfail insmod part_msdos insmod ext2 set root='(hd0,msdos7)' search --no-floppy --fs-uuid --set 8420-4672 linux /EFI/boot/vmlinuz0 root=/dev/sda7 rw quiet splash initrd /EFI/boot/initrd0.img }
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.0 -
I am glad to see that my instructions helped, I am a loyal slackware user because of the simplicity provided by a lack of automated function and assumed actions.
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.0 -
As a note I have been able to get slackware and ubuntu (alternate installer) to boot and run perfectly in lilo and the grub options may not differ much. I will be writing some blog based tutorials for partition based installations later to cover what I found.
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.0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 791 Linux Foundation IT Professional Programs
- 353 Cloud Engineer IT Professional Program
- 178 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 147 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 47 LFC110 Class Forum - Discontinued
- 71 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 38 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 697 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 148 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 28 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 134 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 152 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)