wiki:macDevelUSB

Version 1 (modified by juanfran, 10 years ago) (diff)

--

Crear USB oglive desde cero

Es necesario:

  • Inintrd de opengnesys (oginitrd.img) modificado para emular pxe y descargar la entrada de grldr (menu.lst) y el kernel de OlpenGnsys?
  • Grub2 compilado para sistemas efi de 64 bits (bootx64.efi)
  • Archivo grub.cfg con el menu de arranque
  • Pendrive

1)Preparacion de la unidad de arranque

Ejecutar las siguientes instrucciones en la para unidad del pendrive:

?> parted -s /dev/sdX mklabel GPT ?> parted -sm /dev/sdX mkpartfs EFI fat32 20.5k 210m 2

2)Compilacion de grub2

Una vez descargado grub de la direccion y descomprimido ejecutar las siguientes instruccuines :

?> sudo apt-get install bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev freetype2-demos texinfo ?> export EFI_ARCH=x86_64 ?> ./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix="" ?> make ?> sudo ./grub-mkimage -O x86_64-efi -d ./grub-core -o bootx64.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot video_fb efi_gop efi_uga font test search ?> montar el Pendrive y Crear una carpeta /efi/boot/grub ?> sudo cp bootx64.efi *.mod *.lst /mnt/sdaX/efi/boot/grub

3)copiar ogvmlinux y oginitrd en la carpeta /mnt/sdaX/efi/boot

4)Creacion del menu de arranque

Ejemplo de configuracion del archivo grub.cfg :

#definicion de variables ########################

set timeout=3 set default=0 #search.file /efi/boot/bootx64.efi root set nextboot="pxe"

#controladores graficos para grub ##################################

set GRUB2_PREFIX_DIR=/efi/boot/grub/ insmod $GRUB2_PREFIX_DIR/video_fb.mod insmod $GRUB2_PREFIX_DIR/efi_gop.mod insmod $GRUB2_PREFIX_DIR/efi_uga.mod #insmod $GRUB2_PREFIX_DIR/font.mod

if loadfont $GRUB2_PREFIX_DIR/fonts/unicode.pf2 ; then

#set gfxmode=auto #set gfxmode=1920x1080 set gfxmode=1280x720 #insmod $GRUB2_PREFIX_DIR/gfxterm.mod

fi terminal_output gfxterm background_image /fondos/1280x720.png set COLOR_NORMAL="black/black" set COLOR_HIGHLIGHT="black/light-gray" ################################## #if loadfont $GRUB2_PREFIX_DIR/fonts/unicode.pf2 #then

#insmod $GRUB2_PREFIX_DIR/gfxterm.mod #set gfxmode=auto #set gfxpayload=keep #terminal_output gfxterm

#fi #terminal_output console

#Menus de inicio ################################## fakebios insmod $GRUB2_PREFIX_DIR/test.mod search.file /boot.mac nextboot

if [ test $nextboot == "pxe" ] then

set nextboot="pxe" search.file /boot.win nextboot if [ test $nextboot != "pxe" ] then

menuentry 'Windows 7' --class os { search.file /Windows/Boot?/EFI/bootmgr.efi root loadbios /efi/boot/vbios.bin /efi/boot/int10.bin chainloader +1 } set nextboot="pxe"

fi

menuentry 'Cliente pxe en kernel IOG ker3.8 og1.05' --class gnu-linux --class gnu --class os { search.file /efi/boot/bootx64.efi root loadbios /efi/boot/vbios.bin /efi/boot/int10.bin linux /efi/boot/clientepxe/ogvmlinuz vga=788 acpi=force ip=dhcp initrd /efi/boot/clientepxe/oginitrd.img } set nextboot="pxe" search.file /boot.me nextboot if [ test $nextboot != "pxe" ] then

menuentry 'Cliente pxe en kernel IOG ker3.8 og1.05 (boot.me)' --class gnu-linux --class gnu --class os { search.file /boot.me root loadbios /efi/boot/vbios.bin /efi/boot/int10.bin linux /efi/boot/clientepxe/ogvmlinuz vga=788 acpi=force ip=dhcp initrd /efi/boot/clientepxe/oginitrd.img } menuentry 'Cliente pxe en ogClient IOG ker3.7 og1.04' --class gnu-linux --class gnu --class os { search.file /boot.me root loadbios /efi/boot/vbios.bin /efi/boot/int10.bin linux /efi/boot/clientepxe.3.7/ogvmlinuz vga=788 acpi=force ip=dhcp initrd /efi/boot/clientepxe.3.7/oginitrd.img } set nextboot="pxe"

fi

search.fs_label ogClient nextboot if [ test $nextboot != "pxe" ] then

#solo para arranque desde pendrive menuentry "ogclien online" { search.fs_label ogClient root linux /boot/ogvmlinuz ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=smb ogactiveadmin=true ogdebug=true ip=dhcp boot=oginit quiet splash irqpoll acpi=on og2nd=sqfs ogactiveadmin=false ogdebug=false ogupdateinitrd=true vga=788 LANG=es_ES ip=172.17.69.230:172.17.69.233:172.17.69.254:255.255.255.0:BootOffLine:eth0:none group=Aula1 ogrepo=172.17.69.233 oglive=172.17.69.233 oglog=172.17.69.233 ogshare=172.17.69.233 initrd /boot/oginitrd.img }

menuentry "ogclien local repo online" { search.fs_label ogClient root linux /boot/ogvmlinuz ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=false ip=dhcp boot=oginit quiet splash irqpoll acpi=on og2nd=sqfs ogactiveadmin=false ogdebug=false ogupdateinitrd=true vga=788 LANG=es_ES ip=172.17.69.230:172.17.69.233:172.17.69.254:255.255.255.0:BootOffLine:eth0:none group=Aula1 ogrepo=172.17.69.233 oglive=172.17.69.233 oglog=172.17.69.233 ogshare=172.17.69.233 initrd /boot/oginitrd.img }

menuentry "ogclien offline debug noip" { search.fs_label ogClient root linux /boot/ogvmlinuz ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=true ip=none initrd /boot/oginitrd.img } menuentry "ogclien offline bash noip" { search.fs_label ogClient root linux /boot/ogvmlinuz ro vga=788 irqpoll acpi=on boot=oginit oginit=/bin/bash og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=false ip=none initrd /boot/oginitrd.img }

menuentry "ogclien offline debug ip=dhcp" { search.fs_label ogClient root linux /boot/ogvmlinuz ro vga=788 irqpoll acpi=on boot=oginit og2nd=sqfs ogprotocol=local ogactiveadmin=true ogdebug=true ip=dhcp initrd /boot/oginitrd.img } set nextboot="pxe"

fi

fi

#siempre presentara la opcion de arranque en macosx

#if [test $nextboot == "hd1,gpt1" ] then menuentry 'Macosx hd1,2' --class gnu-linux --class gnu --class os { search.file /System/Library/CoreServices?/boot.efi root #set root=(hd1,gpt2) chainloader /System/Library/CoreServices?/boot.efi #chainloading +1 }

Attachments (3)

Download all attachments as: .zip