You are not logged in.

#1 2012-03-04 15:13:55

satanalin
Member
From: Moscow
Registered: 2009-11-08
Posts: 14

Installation using usb-stick & grub4dos

I want to install arch using grub4dos without any partitions and iso-writing. Just put iso on usb-stick, make some magic with grub4dos and install arch.
So, Now I can boot arch iso, but my boot from this iso crush.
Grub:

map --heads=0 --sectors-per-track=0 /arch.iso (0xff)  
map --hook
root (0xff)
chainloader (0xff)

this code works fine, arch.iso booting fine, that it loads kernel, but can't find device "boot device didn't show up after 30 seconds" because it search for disk-by-label=ARCH-BLABLA, but my usb-stick has FLASH label
I have tried to boot using kernel and initrd commands in grub, without loading arch boot menu - nothing works.
I have tried to change label, in arch boot menu I pressed tab, then change archlabel to FLASH (my usb-stick label), but it still can't find device.

Any ideas?

Last edited by satanalin (2012-03-04 15:14:51)

Offline

#2 2012-03-04 15:35:46

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Installation using usb-stick & grub4dos

What is your goal? Why not dd the iso to a flash drive?

I don't know much about grub4dos, but you shouldn't be booting via the iso. You'll need to extract the kernel, initrd, and various filesystem squashpkgs.


Website - Blog - arch-home
Arch User since March 2005

Offline

#3 2012-03-04 16:15:04

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Installation using usb-stick & grub4dos

https://wiki.archlinux.org/index.php/US … ng_MEMDISK


Edit: If you want to adapt it to Linux instead of Windows you can probably use:

# extlinux --install /media/your_disk/Boot/Settings/
# cat /unzippedfile/mbr/mbr.bin > /dev/sd[x]

instead of

syslinux.exe -m -a -d /Boot/Settings X:

...but I haven't tested it. Let me know how it goes so I can add it to the wiki.

Last edited by DSpider (2012-03-04 16:28:23)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#4 2012-03-04 16:18:49

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Installation using usb-stick & grub4dos

Sure that works, but it is really, really, really crappy method.

You need to load the ISO into the ram, and then the ISO loads its files into the ram, A method such as this is far superior: https://wiki.archlinux.org/index.php/US … _USB_drive


Website - Blog - arch-home
Arch User since March 2005

Offline

#5 2012-03-04 16:27:40

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Installation using usb-stick & grub4dos

Maybe. But it works. And it may be useful to some people, because once the ISO is loaded you can pull the USB stick out, plug it in another computer and do your thing from there too.

Basically once you get to the Arch menu you're done with the USB stick. wink

Last edited by DSpider (2012-03-04 16:31:01)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#6 2012-03-04 17:55:31

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: Installation using usb-stick & grub4dos

DSpider wrote:

Maybe. But it works. And it may be useful to some people, because once the ISO is loaded you can pull the USB stick out, plug it in another computer and do your thing from there too.

Basically once you get to the Arch menu you're done with the USB stick. wink

For such thing there is copytoram boot param, instead of the most discourage boot method (memdisk).

Offline

#7 2012-03-04 18:00:19

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: Installation using usb-stick & grub4dos

@satanalin: if such device is not presented as some know block device, there is nothing to do.

Offline

#8 2012-03-04 18:44:31

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Installation using usb-stick & grub4dos

Interesting. How do you boot an entire ISO with just the "copytoram" parameter? Because you mentioned it before and now you got me curious.

And without extracting it... I'd really like to keep the ISO intact.

Last edited by DSpider (2012-03-04 18:45:05)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-03-04 19:24:59

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: Installation using usb-stick & grub4dos

@DSpider: There is not need to keep entire iso in memory, only needed parts. In our case copytoram=y just copies *.sfs (used) to /run/copytoram.

Offline

#10 2012-03-05 08:43:57

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: Installation using usb-stick & grub4dos

Here is another, quite simple alternative: get the kernel and initrd image from archboot isos and just make a grub entry for them (can be downloaded directly here), e.g.

title  Install
root   (hdx,y)
kernel /path/to/vmlinuz
initrd /path/to/initrd.img rootdelay=10

Archboot runs entirely in RAM from the initrd image, so no need for anything else - but you won't have the packages mounted obviously, so do a net install.

Offline

#11 2013-08-20 21:49:30

Hydranix
Member
Registered: 2013-02-10
Posts: 55

Re: Installation using usb-stick & grub4dos

Since grub4dos is still used for this purpose, and since this topic turns up on google as a first hit for some very generic search terms, I'll add an easy solution.


Arch can easily be booted via it's installation ISO using the OP's method, with a small prior to the initramfs mounting it's filesystems.

after using


map --mem (hd?,?)/path/to/arch.iso (0xff)
map --hook
chainloader (0xff)
boot

GRUB chainloads up the isolinux bootloader from the iso now mapped in memory.

Upon selecting your architecture, isolinux begins the system's transition from real mode to protected mode.
It loads the kernel and initrd correctly from memory back to memory, however once the kernel is bootstrapped, the iso in memory is lost.

The mount's fail because the iso isn't designed to boot via grub4dos memory mapping.

You are however dropped to a rescue shell.

You can now mount the filesystem of the usb that the iso is contained within, and copy it back to memory, and with either a loopback mount or a symlink, you're good to go.

# make a new directory to mount the usb partition
mkdir /usb

# mount the usb partition (you can check with lsblk or blkid both included in the initramfs shell)
mount /dev/sd?? /usb

# copy the iso to the /dev directory
# or similar location that is preferrably passed on to the root filesystem at chroot
cp /usb/path/to/arch.iso /dev/arch.iso

# cleanup after yourself as a best practice i suppose (also want to remove the flashdrive right?)
umount /usb;rmdir /usb

# either of these methods works for me.
losetup -f /dev/arch.iso
# or
ln -s /dev/arch.iso /dev/disk/by-label/ARCH_?????? # being the date on the iso label

# You could also just copy the iso into the /dev/disk/by-label directory with the label as the file name "ARCH_??????"

# exit twice because you drop back into rescue shell the first time.
exit # or [ctrl] + [d]
exit # or [ctrl] + [d]

Arch should boot correctly and quickly!

Offline

#12 2013-09-15 00:49:29

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Installation using usb-stick & grub4dos


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB