[arch-general] Boot iso with grub2

Christopher Rogers slaxemulator at gmail.com
Thu Apr 1 00:50:03 CEST 2010


There has been a request for a findiso boot option so you can boot the iso
with grub2 on a usb stick. I have this feature in my archiso-live and it
works very well.

Here is some code i have for it:

_mnt_iso() {
    img="${1}"
    #mnt="${2}"
    mnt="/tmpfs/mnt/findiso"
    msg "::: Mounting ${img} to ${mnt}"
    mkdir -p "${mnt}"
    mount -r -t iso9660 "${img}" "${mnt}"
}
I remade my archiso hook to look more like the official one yesterday.

I also added a _mnt_move function so you can move mounts instead of just
bind them. Here is code for that:

_mnt_move() {
    src="${1}"
    mnt="${2}"
    msg "::: Moving ${src} to ${mnt}"
    mkdir -p "${mnt}"
    /bin/mount -o move "${src}" "${mnt}"
}

I believe the /bootmnt could use _mnt_move instead of _mnt_bind. I have more
features that could be added too.

I hope this helps.


More information about the arch-general mailing list