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.
Is there a tutorial on how you install from hard disk with the help of usb boot image?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
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- 1 Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 1.4K LFS258 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 946 Programming and Development
- 310 Kernel Development
- 618 Software Development
- 979 Software
- 371 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class 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)