grubconfig to install easily grub legacy (0.97) on porteus

Here you can post about non-standard installation methods
(for example when using grub4dos).
User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

grubconfig to install easily grub legacy (0.97) on porteus

Post#1 by francois » 29 Dec 2011, 03:47

Searching for a simple way to install grub 0.97 on hdd, I tripped on the following thread by a certain Jayflood (alia broken man):
http://www.slax.org/forum.php?action=vi ... ntID=49789

grub 0.97 slackware with grubconfig command compatible ext4:
-32 bit and 64 bit:
http://mirrors.slackware.com/slackware/ ... i486-9.txz
-64 bit: this version supports ext4 filesystem
http://repository.slacky.eu/slackware-1 ... 86-4sl.txz

Just transform the tgz package to xzm module, activate it. Then in cli mode use the command grubconfig:

Code: Select all

bash-4.1# grubconfig
and follow the instructions. Kent Robotti's 'grubconfig' tool is similar to the Slackware 'liloconfig' setup tool.

IMPORTANT: If you work with an already functional bootloader, DO NOT FORGET to have in hand a functional grub legacy menu.lst and replace the one provided by the grubconfig command. Grubconfig is not able to catch porteus linux special cheatcodes. The OS will not load. In addition, if you are a neophyte to linux you better be accompanied to do such manipulations.

An example of a functional menu.lst entry from a previous discussion of multiple porteus oses on the same partition:
http://forum.porteus.org/viewtopic.php? ... 6&start=10

Code: Select all

title porteus  on sda5 64bit_v30  KDE 
root (hd0,4)
kernel /64bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v30 extramod=/mnt/sda5/64bit_v30/kde changes=EXIT:/64bit_v30/kde   login=root
initrd /64bit_v30/boot/syslinux/initrd.xz
boot

title porteus  on sda5 32 BIT v30  KDE SPMDEB
root (hd0,4) 
kernel /32bit_v30/boot/syslinux/vmlinuz from=/dev/sda5/32bit_v30 extramod=/mnt/sda5/32bit_v30/kde changes=EXIT:/32bit_v30/kde login=root 
initrd /32bit_v30/boot/syslinux/initrd.xz
boot

title porteus v3_64 on sda5 64bit_v30_ANGER   ANGRY GNOME
root (hd0,4)
kernel /64bit_v30_ANGER/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v30_ANGER changes=EXIT:/64bit_v30_ANGER/porteus login=root
initrd /64bit_v30_ANGER/boot/syslinux/initrd.xz
boot
Note: In the faq section ahau has described the method to install grub legacy:
http://www.porteus.org/tutorials/12-boo ... drive.html
Last edited by francois on 24 Oct 2014, 04:43, edited 9 times in total.
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig command to install easily grub legacy (0.97)

Post#2 by francois » 26 Jun 2013, 02:46

This utility for grub saves my life. 8)
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig command to install easily grub legacy (0.97)

Post#3 by francois » 28 Jun 2013, 01:47

Updated grubconfig download in first post of this thread for 64 bit architecture. :)
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig command to install easily grub legacy (0.97)

Post#4 by francois » 23 Jul 2013, 19:04

First post edited for porteus 2.0 and 2.1. 8)
Prendre son temps, profiter de celui qui passe.

pchan
White ninja
White ninja
Posts: 23
Joined: 30 Jul 2013, 07:22
Distribution: Porteus v2 xfce
Location: malaysia

Re: grubconfig command to install easily grub legacy (0.97)

Post#5 by pchan » 12 Aug 2013, 18:10

LABEL xfce
MENU LABEL Graphics mode (XFCE)
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/porteus/change.dat login=root
TEXT HELP
Run Porteus the best way we can.
Try to autoconfigure graphics
card and use the maximum
allowed resolution
ENDTEXT
Here's my porteus.cfg

Porteus 2.1 xfce
Fat32 sdcard
Netbook : acer aspire d257 netbook
Intel Atom n570


Hoping to be able to log in without login screen
Cheatcode "login=root" is used and typed in at the end of the append line.
Status : not working. need help

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig command to install easily grub legacy (0.97)

Post#6 by francois » 12 Aug 2013, 20:30

@pchan:

1.0 I am at work right now. But I have seen that Ahau has responded to you on the other thread. Please answer according to the info that he has asked you first. He is trying to troubleshoot the issue. He is really good at it. If you do not understand what is required, ask some questions.

2.0 What are you expecting of me by posting the above information? If your question is for me to provide a menu.lst for you, I need some additional information. Please, give me the output of fdisk -l and blkid commands with your sdcard inserted on the computer.

For example, on my computer:
2.1 Finding the UUID of the sdcard.
From fdisk -l, I identify my usb key, which is /dev/sdc and partition /dev/sdc1 (you have to find your sdcard)

Code: Select all

root@porteus:~/Desktop# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdfbadfba

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   169402367    84700160    7  HPFS/NTFS/exFAT
/dev/sda3       169437616   625137344   227849864+   5  Extended
/dev/sda5       230581008   310279409    39849201   83  Linux
...
...
Partition table entries are not in disk order

Disk /dev/sdc: 8019 MB, 8019509248 bytes
251 heads, 44 sectors/track, 1418 cylinders, total 15663104 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00037247

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    15663103     7830528   83  Linux
Then with blkid, I get the UUID (unique identification number for the partition of my usb key, here cb81a316-66b7-4a04-9760-43357614fc06:

Code: Select all

root@porteus:~/Desktop# blkid
/dev/sda1: UUID="A07E59777E594766" TYPE="ntfs" 
/dev/sda5: UUID="bea08a25-5ee5-45f4-bf0c-77f040d19295" TYPE="ext2" 
/dev/sda6: UUID="77b01f1e-cf3a-4036-81f4-76938ec3b5d9" TYPE="ext4" 
/dev/sda7: UUID="9da4aa97-57a2-42b6-a069-9b40f65ad8bd" TYPE="ext2" 
/dev/sda8: UUID="85f99856-4761-47d0-b724-7183c589a324" TYPE="ext2" 
/dev/sda9: UUID="a1c477b1-ad99-4f2c-a513-aadbb4cd2e5e" TYPE="ext4" 
/dev/sda10: UUID="bb0b7897-4190-4f05-af90-40fcaa02b362" TYPE="swap" 
/dev/sda11: UUID="d341bd94-cbec-478a-a1fe-64889d226268" TYPE="ext2" 
/dev/loop0: TYPE="squashfs" 
...
... 
/dev/sdc1: UUID="cb81a316-66b7-4a04-9760-43357614fc06" TYPE="ext2" 
root@porteus:~/Desktop# 
2.2 Preparing a menu.lst for the sdcard (you will have to save that menu.lst anywhere else than in the /boot/grub/menu.lst for now).
Then your menu.lst should look like, inserting the uuid of your sdcard:

Code: Select all

title porteus v2.1 my-architecture on sdcard sdxy Graphics mode (XFCE)   
root (hd0,0)
kernel /boot/syslinux/vmlinuz from_dev=/dev/disk/by-uuid/UUID:cb81a316-66b7-4a04-9760-43357614fc06 changes=EXIT:/dev/disk/by-uuid/cb81a316-66b7-4a04-9760-43357614fc06/porteus/change.dat login=root
initrd /boot/syslinux/initrd.xz
boot
3.0 As your sdcard to get a grub bootloader has to be unmounted, you have to proceed from a porteus cd and you need the grubconfig.xzm activated on it or on any secondary support.
Just follow the instructions in the first post.

***CAUTION***
In your case do not put mbr on sda, your computer hdd. You have to set it on your sdcard /dev/sdx as identified command fdisk -l once you boot with a secondary linux support. This might not be the same as the one you got booting from your actual sdcard with the porteus installation. If you are good with disk partitioning, the worst that could happen is that you put the mbr on the wrong partition which will be taken into account by the menu.lst generated by grub.

Edited as of august 12th, 2013 at 21:12 from Montréal, Québec.
Prendre son temps, profiter de celui qui passe.

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: grubconfig to install easily grub legacy (0.97)

Post#7 by Bogomips » 16 Oct 2015, 12:29

@francois
^ This link is not clear. Will be grateful if you can either point to relevant post, or provide in easy steps what needs to be done.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig to install easily grub legacy (0.97)

Post#8 by francois » 16 Oct 2015, 21:23

In fact, the link in the first post was no more good. It works now. For ext4 file system, not tested. Has to be tested.

I have removed this post that offended clarity.

Thanks.
Prendre son temps, profiter de celui qui passe.

aus9

Re: grubconfig to install easily grub legacy (0.97)

Post#9 by aus9 » 18 Oct 2015, 00:22

@francois

Just a suggestion, and only if you agree, I prefer the use of LABEL to UUID for 2 main reasons.
1) UUID needs copy and paste to be accurate and not easy to type manually and that leads to
2) When in grub command mode, its easy to type
"kernel /pathway/vmlinuz root=LABEL=mylabel bootcodes" etc

Maybe you could add a LABEL menu to first post?

/sbin/e2label needs root powers to add label, for those interested in trying it.

I am currently using grub2 so feel free to ignore me. :wink:

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig to install easily grub legacy (0.97)

Post#10 by francois » 18 Oct 2015, 00:57

@aus9:
I have never used label but it makes sense.

I am unable to get it going. It does not work with the from= cheatcode. Maybe bogomips of someone else like ed will have more success with it.

If not your demand could be added to the next porteus whishlist. :)
Prendre son temps, profiter de celui qui passe.

aus9

Re: grubconfig to install easily grub legacy (0.97)

Post#11 by aus9 » 18 Oct 2015, 07:01

@francois
I am unable to get it going. It does not work with the from=
sorry I should have expained how to set it up?

Code: Select all

e2label /dev/sda1
bash: e2label: command not found
This is normal behaviour....it means we must run as root. Sorry if that sounds rude better to put more info that let it left unsaid?

Code: Select all

e2label /dev/sda1
p1
Above command shows in the past....e2label or e2fsprogs's tune command or gparted has already set up a label.
Trouble is, most people do not want to load a live cd, umount then re-label using gparted so we do this on the fly.

So I am going to change it, check it and change it back and check it with next commands

Code: Select all

e2label /dev/sda1 pp
root@porteus:/# e2label /dev/sda1
pp
root@porteus:/# e2label /dev/sda1 p1
root@porteus:/# e2label /dev/sda1
p1
Note that e2label is dumb....meaning if won't complain if a label is already set.

Also e2label is for labelling ext2/3/4 partitions and others may need to search for other tools to label other partition types.

2) Since you know how to edit your menu.lst I suggest you copy each menu and then adjust the duplicate entry to try out label and then reboot to test.

one possible entry duplication would look like this
title sda5 LABEL
root (hd0,4)
kernel /64bit_v30_ANGER/boot/syslinux/vmlinuz root=LABEL=p5 changes=EXIT:/64bit_v30_ANGER/porteus login=root
initrd /64bit_v30_ANGER/boot/syslinux/initrd.xz

title porteus v3_64 on sda5 64bit_v30_ANGER ANGRY GNOME
root (hd0,4)
kernel /64bit_v30_ANGER/boot/syslinux/vmlinuz from=/dev/sda5/64bit_v30_ANGER changes=EXIT:/64bit_v30_ANGER/porteus login=root
initrd /64bit_v30_ANGER/boot/syslinux/initrd.xz
MY memory is you can drop boot from your menu....you only need boot if you are in command mode.

If I need to post more, we can get mods to split this post if you like as I was not trying to hijack your post only make a suggestion.

good luck

PS Not sure why you like to boot into root.
EDIT
##########################
Being a bit slow, I should have asked another question.

If you are truly using grub (legacy) to boot porteus, did you know you can reduce your files to a bare minimum

eg on sda5
/grub/vmlinuz
/grub/initrd.xz
/grub/stage1
/grub/stage2
/grub/e2fs_stage1_5
/grub/menu.lst

and your porteus folders
then you will need to re-embed grub but I am not sure if you used MBR or PBR

good luck

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Re: grubconfig to install easily grub legacy (0.97)

Post#12 by francois » 20 Oct 2015, 02:34

@aus9:
I think I will save my fingers for syslinux instead. I have to admit that grub legacy, though easy to use is no longer maintained. Ed will be happy to read that I finally admit that.

Thus at some point, I will come back to this thread for your suggestion and apply it to syslinux.

Here is what I tried:

Code: Select all

title porteus v2.1 my-architecture on sdcard sdxy Graphics mode (XFCE)   
root (hd0,0)
kernel /boot/syslinux/vmlinuz from_dev=/dev/disk/by-label/porteus-hdd changes=EXIT:/dev/disk/by-label/porteus-hdd/porteus/change.dat login=root
initrd /boot/syslinux/initrd.xz
boot
Prendre son temps, profiter de celui qui passe.

aus9

Re: grubconfig to install easily grub legacy (0.97)

Post#13 by aus9 » 20 Oct 2015, 07:57

no worries. I hope you don't mind I have sent you 2 related pms.

for any aussies wanting the 32 bit package try

http://mirror.internode.on.net/pub/slac ... i486-9.txz
then run the command

Code: Select all

txz2xzm grub-0.97-i486-9.txz

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: grubconfig to install easily grub legacy (0.97)

Post#14 by Ed_P » 20 Oct 2015, 14:12

francois wrote:I have to admit that grub legacy, though easy to use is no longer maintained. Ed will be happy to read that I finally admit that.
Image
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2564
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: grubconfig to install easily grub legacy (0.97)

Post#15 by Bogomips » 21 Oct 2015, 12:06

On 0.96 with slightly outdated h/w, so do not have to bother if maintained or not. 8)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

Post Reply