unetbootin frugal/full install on HDD (without USB flash)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
wayne128

unetbootin frugal/full install on HDD (without USB flash)

Post by wayne128 »

This is not a how to.
It is just my experiment, to figure out how to use unetbootin to frugal install iso as well as full install to hard disk without using USB flash.

Well, many of us are using unetbootin to prepare bootable USB flash, so that we can test a new iso using usb flash/thumb drive/etc without a need to burn DVD/CD.

If we do not need USB flash, the procedure might be simpler and perhaps faster too because Hard disk is very fast on read/write cycle compared with USB flash.
Perhaps it helps for those who do not have DVD/CD ( like netbook or some laptops).

For this experiment, I will be using unetbootin, following their procedure in their website, to do a frugal install without using USB flash.

Here is the main link to unetbootin http://unetbootin.sourceforge.net/

Here is link inside the main link above: http://sourceforge.net/apps/trac/unetbo ... howitworks

I copy out here on relevant portion so as reader can zoom into the subject.

Hard Disk (frugal) install mode

Code: Select all

On Windows, UNetbootin modifies boot.ini (on 2000/XP), or uses bcdedit (on Vista/7) to add a boot menu option titled UNetbootin. This loads the GRUB4DOS bootloader, which is installed at /ubnldr and /ubnldr.mbr, and this in turn reads boot menu entries from /unetbtin/menu.lst. The installation .exe file is copied to /unetbtin.exe, and this is added to autorun upon the next bootup. When run, this will uninstall UNetbootin by deleting the extracted files (which is recorded using /ubnfilel.txt and /ubnpathl.txt) and removing the UNetbootin boot menu entry.

On Linux, menu.lst (if using GRUB) or grub.cfg (if using GRUB2) is modified to add the UNetbootin entry. The existing config file is backed up to menu.lst.bak or grub.cfg.bak. When UNetbootin is run again, the uninstaller is run; this will delete the extracted files (which is recorded using /ubnfilel.txt and /ubnpathl.txt) and restore the backed-up boot configuration files. 

Let me start from my 'master boot loader', the one that control MBR.
I used grub legacy to control MBR. Below would be for grub legacy.
Later on I shall try experiment using grub2 and win7 and write down some information for people who are interested.


A. MBR controller by Grub legacy


1. Running from a distro already installed in hard disk, which has grub legacy as boot loader and it is controlling MBR.

2. Have some iso ready in your hard disk, for this illustration I have

lmdexfce32_up6beta1_201301.iso

3. Either run from installed unetbootin or download linux version of unetbootin and run directly

4. as usual , check 'Diskimage' , and select the iso file by pointing to the right file location,
reference image below.
http://sourceforge.net/dbimage.php?id=294733

5. on the last line, Type, you would see USB Drive by default, click the up/down arrow on its right , move mouse to Hard Disk and right click it. Now you see Hard Disk in the Type

well, take a deep breath... and click OK... watch it works.

6. at the end, it should complete just like what you are familiar with using usb flash.

This is where the above note said: unetbootin will modify grub legacy..
Below shows a new file menu.lst.bak
ls /boot/grub/
default iso9660_stage1_5 menu.lst.example stage2
device.map jfs_stage1_5 message xfs_stage1_5
device.map.example menu.lst minix_stage1_5
e2fs_stage1_5 menu.lst~ reiserfs_stage1_5
fat_stage1_5 menu.lst.bak stage1

Here I copy the /boot/grub/menu.lst that unetbootin added.

Code: Select all

title UNetbootin
root (hd0,0)
kernel  /boot/ubnkern boot=live config live-media-path=/casper quiet splash --
initrd /boot/ubninit 
boot

title Start Linux Mint
root (hd0,0)
kernel /casper/vmlinuz boot=live config  live-media-path=/casper quiet splash --
initrd /casper/initrd.lz
boot

title Start Linux Mint (compatibility mode)
root (hd0,0)
kernel /casper/vmlinuz boot=live config xforcevesa  live-media-path=/casper ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
initrd /casper/initrd.lz
boot

title Check the integrity of the DVD
root (hd0,0)
kernel /casper/vmlinuz boot=live integrity-check  live-media-path=/casper
initrd /casper/initrd.lz
boot

title Memory Test
root (hd0,0)
kernel /isolinux/memtest 
initrd /boot/ubninit
boot

title Boot from local drive
root (hd0,0)
kernel /boot/ubnkern 
initrd /boot/ubninit
boot
7. Now reboot, the additional menu appear exactly as what unetbootin has modified

UNetbootin
Start Linux Mint
Start Linux Mint (compatibility mode)
Check the integrity of the DVD
Memory Test
Boot from local drive

8. select one of those, which is really similar to your usual menu on USB flash.
From their written procedure and other forums, usually forumers said to select UNetbootin, which is really the default.

Just to summarise, unetbootin has frugal installed the iso into the running Linux OS and it has also modified grub legacy's /boot/grub/menu.lst , so that when we reboot the new boot menu allow us to select and boot the iso, and run LIVE mode.

9. Next step, I proceed to install onto a pre-prepared / partition, as per normal installation procedure.

10. Reboot, and I can now run lmdexfce32_up6beta1_201301.iso installed on Hard disk.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
wayne128

Re: unetbootin frugal/full install on HDD (without USB flash

Post by wayne128 »

just reserve for grub2 experiment

quick update:
I use one distros with grub2, let it take over MBR.

Then repeat the experiment: in summary : IT WORKS!

also it is really FAST:
probably 1 minutes for unetbootin to prepare iso to bootable.. usually USB flash might take many more minutes..


The backup file, grub.cfg.bak was created.

Code: Select all

$ ls /boot/grub/grub.cfg*
/boot/grub/grub.cfg  /boot/grub/grub.cfg.bak

The grub.cfg has added entries onto 41_custom
Something unusally on all root (hd0,7) except the first UNetbootin with (hd0,8)

anyway I reboot, saw grub2 added entries, I choose UNetbootin line, and happy to see it boot and run Live mode
then I install as per usual, and no issue for the installation process.
and installation process is FAST too.. just because hard disk works faster than USB flash, i guess..

Code: Select all

### END /etc/grub.d/41_custom ###


menuentry "UNetbootin" {
	set root=(hd0,8)
	linux  /boot/ubnkern root=UUID=22df5cc8-06c2-4bf0-a853-1402cdc77d4a rootfstype=auto ro liveimg quiet rhgb quiet elevator=deadline rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM
	initrd /boot/ubninit 
}

menuentry "Boot" {
	set root=(hd0,7)
	linux /isolinux/vmlinuz0 root=UUID=22df5cc8-06c2-4bf0-a853-1402cdc77d4a rootfstype=auto ro liveimg quiet rhgb quiet elevator=deadline rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM
	initrd /isolinux/initrd0.img
}

menuentry "Boot (Basic Video)" {
	set root=(hd0,7)
	linux /isolinux/vmlinuz0 root=UUID=22df5cc8-06c2-4bf0-a853-1402cdc77d4a rootfstype=auto ro liveimg quiet rhgb quiet elevator=deadline rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM xdriver=vesa nomodeset
	initrd /isolinux/initrd0.img
}

menuentry "Verify and Boot" {
	set root=(hd0,7)
	linux /isolinux/vmlinuz0 root=UUID=22df5cc8-06c2-4bf0-a853-1402cdc77d4a rootfstype=auto ro liveimg quiet rhgb quiet elevator=deadline rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM  check
	initrd /isolinux/initrd0.img
}

menuentry "Boot from local drive" {
	set root=(hd0,7)
	linux /boot/ubnkern 
	initrd /boot/ubninit
}
Last edited by wayne128 on Tue Jan 08, 2013 12:42 pm, edited 1 time in total.
wayne128

Re: unetbootin frugal/full install on HDD (without USB flash

Post by wayne128 »

just reserve for win7 experiment


Update: frugal install works OK for Win7 or WinXP.

The steps are
1. run from Win7 or WinXP
2. go to unetbootin website, download Windows version and install
3. download the Linux iso or have Linux iso available on USB drive/USB stick
4. run Unetbootin, point to Linux iso, and select HDD , Apply.
5. reboot computer, select 'unetbootin' to run Linux iso in Live mode.
Last edited by wayne128 on Fri Apr 11, 2014 7:27 pm, edited 1 time in total.
android

Re: unetbootin frugal/full install on HDD (without USB flash

Post by android »

Are you talking about running a LIVE linux mint? I was able to get the LIVE running from the grub menu, but not able to install to the partition.
wayne128

Re: unetbootin frugal/full install on HDD (without USB flash

Post by wayne128 »

android wrote:Are you talking about running a LIVE linux mint? I was able to get the LIVE running from the grub menu, but not able to install to the partition.
I can run Live, follow by install into partition.

If you cannot install into partition, you need to check one of those thing in your harddisk partition.

1. run Linux in live mode
2. open a terminal, type these command and post results,

sudo fdisk -l
sudo parted -l
android

Re: unetbootin frugal/full install on HDD (without USB flash

Post by android »

mint@mint ~ $ sudo fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000e5cf3

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 1229006847 614400000 7 HPFS/NTFS/exFAT
/dev/sda3 1229006848 1465143295 118068224 83 Linux


mint@mint ~ $ sudo parted -l
Model: ATA ST9750423AS (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 106MB 105MB primary ntfs boot
2 106MB 629GB 629GB primary ntfs
3 629GB 750GB 121GB primary ext4
Locked

Return to “Installation & Boot”