http://forum.porteus.org/viewtopic.php?f=62&t=946
The article on grub2 on doimedo is well written and organised (proposed by Donald):
http://www.dedoimedo.com/computers/grub-2.html
A good thread providing examples on how to manage multiple system with grub2:
http://crunchbang.org/forums/viewtopic.php?id=17005
A gui tool to simplify the life of some of us with grub2, grub-customizer. It permits amongst other manipulations to set the order of the linux system for the bootloader:
http://www.howtogeek.com/howto/43471/ho ... -easy-way/
BE SURE TO BACKUP YOU PRECIOUS DATA, BEFORE TRYING THE FOLLOWING. KNOW WHAT YOU ARE DOING.
grub2 for slackware (thanks to tome):
http://mirrors.slackware.com/slackware/ ... 6_64-2.txz
GRUB2 FOR SLACKWARE.
grub2 for slackware is provided by djemos of the salix forum (***not yet functional***):
-thread on grub2 salix:
http://forum.salixos.org/viewtopic.php?f=32&t=4934
-grub2 files:
http://people.salixos.org/djemos/salix/grub-slackware/
Here is what I have done:
-installed the files:
grub-2.00-x86_64-2
os-prober-1.63-x86_64-1
-setup.grubconfig and grubconfig scripts contents have been copied with their respective filename into /sbin
setup.grubconfig or grubconfig command error message:
Code: Select all
Path /boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
Code: Select all
/usr/sbin/grub-probe: error: failed to get canonical path of aufs.
Code: Select all
/usr/sbin/grub-probe: error: failed to get canonical path of aufs.
This has been adressed in the nemesis section. A chroot procedure is provided for arch linux, which is different the chroot procedure below for debian distributions:
viewtopic.php?f=137&t=5105
A. INSTALLING PORTEUS WITHIN THE LINUX DISTRIBUTION USING GRUB2 (porteus will not be recognized by grub2), for example manjaro:
Essentially when you install some other linux distribution, they often install grub2 against your will, it is the most widespread bootloader used in the linux universe. Its not bad to be able to install porteus within grub2, especially if you have a hard time figuring out the menu entry for that new distribution with your usual bootloader.
Porteus could be installed in two steps 1) modify /etc/grub.d/40_custom to add the menu entry for porteus installation and 2) and update these instructions with the update-grub command. In addition, if you want porteus to be loaded automatically, it is good to 3) get grub2 to recognize automatically porteus as the default os and set the timeout at which it will proceed into porteus. This is done within the /etc/default/grub file. After modification of that file, update-grub will have to issued to make the changes to the bootloader effective. The grub.cfg file which is the end result of the menu entries, cannot be modified directly as the menu.lst of grub legacy.
1) Modify /etc/grub.d/40_custom to add the menu entry for your porteus installation. If /etc/grub.d/40_custom does not exist create it.
Here is my entry in /etc/grub.d/40_custom:
1.1 for booting from an iso arch linux or nemesis examples:
viewtopic.php?f=114&t=5059
Code: Select all
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
menuentry "porteus NEMESIS 64bit_v31 XFCE" {
set root=(hd0,6)
linux /64bit_v31_nemesis/boot/syslinux/vmlinuz changes=64bit_v31_nemesis/nemesis login=guest
initrd /64bit_v31_nemesis/boot/syslinux/initrd.xz
}
menuentry "porteus NEMESIS SDA6 XFCE" {
set root=(hd0,6)
linux /boot/syslinux/vmlinuz changes=/nemesis login=guest
initrd /boot/syslinux/initrd.xz
}
menuentry "porteus NEMESIS 64bit_v31 XFCE" {
set root=(hd0,6)
linux /boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31_nemesis changes=/64bit_v31_nemesis png=nemesis login=guest
initrd /boot/syslinux/initrd.xz
}
menuentry "porteus NEMESIS 64bit_v31 XFCE" {
set root=(hd0,6)
linux /64bit_v31_nemesis/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31_nemesis login=guest
initrd /64bit_v31_nemesis/boot/syslinux/initrd.xz
}
menuentry "Porteus NEMESIS BASE PMAN x86-64 ISO" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/nemesis-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile login=guest changes=/1_nemesis
initrd (loop)/boot/syslinux/initrd.xz
}
menuentry "porteus on sda6 64bit_v31 XFCE" {
set root=(hd0,6)
linux /64bit_v31/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31 extramod=/mnt/sda6/64bit_v31/xfce changes=EXIT:/64bit_v31/xfce login=guest
initrd /64bit_v31/boot/syslinux/initrd.xz
}
menuentry "Porteus XFCE x86-64 ISO" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/Porteus-XFCE-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=1_porteus login=guest
initrd (loop)/boot/syslinux/initrd.xz
}
menuentry '[loopback]archlinux-2015.09.01-dual.iso' {
set isofile='/ISO/archlinux-2015.09.01-dual.iso'
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz archisodevice=/dev/loop0 img_dev=$imgdevpath img_loop=$isofile
initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "Arch Linux Install ISO" {
set isoname='archlinux-2015.09.01-dual.iso'
set isofile=/ISO/$isoname
echo 'Using ${isoname}...'
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz img_dev=$imgdevpath img_loop=$isofile archisobasedir=arch archisolabel=ARCH_201509
initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "Porteus XFCE x86-64 ISO" COPY TO RAM{
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/Porteus-XFCE-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=1_porteus login=guest copy2ram
initrd (loop)/boot/syslinux/initrd.xz
}
1.2 for two of my porteus installations;
Code: Select all
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "on sda5 64bit_v31rc1 extramod KDE" {
set root=(hd0,5)
linux /64bit_v31rc1/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v31rc1 extramod=/mnt/sda5/64bit_v31rc1/kde changes=/64bit_v31rc1/kde login=guest
initrd /64bit_v31rc1/boot/syslinux/initrd.xz
}
menuentry "on sda5 64bit_v31rc1 extramod KDE ALWAYS FRESH" {
set root=(hd0,5)
linux /64bit_v31rc1/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v31rc1 extramod=/mnt/sda5/64bit_v31rc1/kde fsck login=guest
initrd /64bit_v31rc1/boot/syslinux/initrd.xz
}
2) Then in root mode update-grub:
Code: Select all
root@toshiba-Satellite-Z930:/home/fl# update-grub
http://linuxpoison.blogspot.ca/2010/11/ ... meout.html
Change default Timeout:
To change the default timeout option in GRUB 2, you just need to change the GRUB_TIMEOUT parameter. The value of this parameter is in sec, change this value as per your requirement.
Change the default boot option:
To change the default boot option in GRUB 2, you just need to change the GRUB_DEFAULT parameter. 0 is the first entry, so if you want Windows to be your default boot option which is, say at, 5th position in the grub menu, then you just need to change the GRUB_DEFAULT value to 4 and save the file and close it.
Save the file after making all the required changes and from the terminal run the following command
sudo update-grub
4) Or better you might want grub2 to save the last selected menu entry for nexbootup, this will not work for porteus entries in the custom_40 file, but only for the other entries:
http://askubuntu.com/questions/148662/h ... ast-choice
You need the following in /etc/default/grub:
Code: Select all
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Code: Select all
GRUB_DEFAULT="n-1"
To register the changes:
Code: Select all
sudo update-grub
It has to be done with a chroot from that installation. The procedure to chroot for a grub2 installed in the /dev/sda1 modifying the default booting linux installation could be done this way:
mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev &&
mount --bind /dev/pts /mnt/dev/pts &&
mount --bind /proc /mnt/proc &&
mount --bind /sys /mnt/sys &&
chroot /mnt
Code: Select all
root@porteus:~# mount /dev/sda1 /mnt
root@porteus:~# mount --bind /dev /mnt/dev &&
mount --bind /dev/pts /mnt/dev/pts &&
mount --bind /proc /mnt/proc &&
mount --bind /sys /mnt/sys &&
root@porteus:~# chroot /mnt
root@porteus:/# nano /etc/default/grub
root@porteus:/# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-61-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-61-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-51-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-51-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-61-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-61-generic-pae
Found linux image: /boot/vmlinuz-3.2.0-51-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-51-generic-pae
done
root@porteus:/#
Code: Select all
root@porteus:~# passwd
Changing password for root
Enter the new password (minimum of 5 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Bad password: too short.
Warning: weak password (enter it again to use it anyway).
New password:
Re-enter new password:
passwd: password changed.
Code: Select all
nano /mnt/etc/default/grub
Code: Select all
...
GRUB_TIMEOUT="3"...
Code: Select all
update-grub
exit &&
umount /mnt/dev &&
umount /mnt/dev/pts &&
umount /mnt/proc &&
umount /mnt/sys &&
umount /mnt
Code: Select all
root@porteus:/# exit &&
> umount /mnt/dev &&
> umount /mnt/dev/pts &&
> umount /mnt/proc &&
> umount /mnt/sys &&
> umount /mnt
exit
Here you can do it from within the os that hosted grub2 or you can proceed externally with the above chroot procedure, from outside the os if you are no more able to boot from within:
Code: Select all
fl@toshiba-Z930:~$ sudo grub-install /dev/sda
Installation finished. No error reported.
fl@toshiba-Z930:~$ sudo grub-install --recheck /dev/sda
Installation finished. No error reported.
fl@toshiba-Z930:~$ sudo update-grub
To install grub2 on a hdd installation, you need the grub2 on a cd or usb. In contrast to grub legacy you have to be out of the device where you want to install grub2, see:
http://phoxis.org/2010/02/03/installing ... ootloader/
mkdir /mnt/tmp
mount /dev/sdXy /mnt/tmp
grub-install --no-floppy --root-directory="/mnt/tmp" /dev/sdX
(to get to know your sdxy use the fdisk -l command)
Grub2 is available for a usb installation of porteus.Thus, you can install grub2 on any hdd partition of a box where you have one or many partitions from this porteus usb key.
You can download grub2 for slackware 14.1 for porteus 3.0 from slackel:
- 32bit:
http://www.slackel.gr/repo/i486/current ... 86-4dj.txz
- 64bit:
http://www.slackel.gr/repo/x86_64/curre ... 64-6dj.txz
Yet I did not achieved to install grub2 on porteus usb. It does not see the bios!! And even if you get it to see the bios:
http://forum.porteus.org/viewtopic.php?f=48&t=3860
The linux structure is not there to be harnessed by grub2. In porteus the linux structure is compressed.
In addition to be able to install grub2:
-Circumventing the /usr/sbin/grub-probe: error message for the grub-install command:
http://askubuntu.com/questions/207663/c ... n-live-usb
USEFUL THREADS:
For general instructions on grub2:
https://help.ubuntu.com/community/Grub2/Setup
Building custom menu for grub2:
https://help.ubuntu.com/community/Grub2/CustomMenus
Here is a link on how to boot from iso ubuntu with grub2:
https://askubuntu.com/questions/340156/ ... ning-linux