frugal install -- menu.lst for old grub version?

User avatar
fredg
Posts: 232
Joined: 3. Oct 2009, 16:50
Location: Lyon, France
Contact:

Re: frugal install -- menu.lst for old grub version?

Post by fredg »

Looks like burninbush is a kind of users that prefer making noise rather than something smart:
http://forum.porteus.org/viewtopic.php? ... 37804b1b2f

@burninbush; You are a very lucky man, you win a warning, and maybe, next time you will be able to win a ban ;)

++
ikke
Posts: 263
Joined: 5. Feb 2010, 22:47

Re: frugal install -- menu.lst for old grub version?

Post by ikke »

burninbush wrote:My interest in Salix was only for the live media, don't need another standard install of slack 13.37. I saw the structure of the dvd and thought perhaps you intended to support expansion of that system with xz modules, a la Slax/Nimblex/Porteus/others, but in looking at the site I see no evidence for that.
Seems you don't read this forum nor had a serious look at the Salix LiveCDs. One of the reasons I am a rather heavy user of Salix Live is the possibility to adapt it to your needs through modules ('.salt', not '.xz').
ikke
Posts: 263
Joined: 5. Feb 2010, 22:47

Re: frugal install -- menu.lst for old grub version?

Post by ikke »

JRD wrote:The SaLT system use "blkid" and "file" to find and determine the filesystem. If any of these tools have problem with ext4, then it is the reason of not finding the distro. I will look into these.
P.S. These tools are not the exact tools you can find in your distro. The first one in the one of busybox, the second one is statically compiled by me to be included in the initrd.
Just to say thank you.
Looking forward to reading your findings.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: frugal install -- menu.lst for old grub version?

Post by Shador »

ikke wrote:One of the reasons I don't use grub2 is that I am not allowed to edit the grub.cfg
That's not true. At least not with Salix. Other distros automatically recreate the grub.cfg on certain events so it's a bad idea as it might get overwritten. Also for a regular system the auto-generation is much more convenient.
The grub.cfg and other .cfg files for grub2 on the live are all written manually. That's no problem at all. You just have to make sure that you don't accidentally run grub-mkconfig, update-grub or similar.
ikke wrote:I do not know how to handle grub2 so that salixlive frugally installed can be booted. Can you provide with your grub2 entry to boot the iso from an ext4 partition. Would like to try it.
I don't have it anymore. But that's what I used: http://www.supergrubdisk.org/wiki/Loopb ... _an_iso.3F
It was an older version, but that one should work too.
Actually the grub2 entries are not that much different from grub legacy (it depends how sophisticated and reliable you want them). That's pretty much the least you could use:

Code: Select all

menuentry 'Arch Linux GNU/Linux, mit Linux pf kernel' {
    set root='hd0,msdos3'
    linux   /boot/vmlinuz-linux-pf root=/dev/sda3 ro  quiet resume=/dev/sda2 resume=swap:/dev/sda2
    initrd  /boot/initramfs-linux-pf.img
}
That's an example from my Arch linux menuentry. For a more sophisticated version look at a version generated by grub-mkconfig. There's also a bit older example in the doc dir of sg2conf.

Anyway, I'm planning to do a short overview about the possibilities to boot live, which can grow in detail in the future.


Could you post the content of the .live file here. It would also be useful if you try booting with 'debug' on the kernel cmdline. When you're dropped to a debugshell just continue. Try to look for lines like this:

Code: Select all

'/$IDENT_FILE:$IDENT_CONTENT' not found in $d
Especially try to catch whether the device with Salix on it appears.

Thanks already for your help.
Image
ikke
Posts: 263
Joined: 5. Feb 2010, 22:47

Re: frugal install -- menu.lst for old grub version?

Post by ikke »

Shador wrote:

Code: Select all

menuentry 'Arch Linux GNU/Linux, mit Linux pf kernel' {
    set root='hd0,msdos3'
    linux   /boot/vmlinuz-linux-pf root=/dev/sda3 ro  quiet resume=/dev/sda2 resume=swap:/dev/sda2
    initrd  /boot/initramfs-linux-pf.img
}
That's an example from my Arch linux menuentry.
Guess this is a grub2 entry for an Arch linux full install not frugal.
Shador wrote:Anyway, I'm planning to do a short overview about the possibilities to boot live, which can grow in detail in the future.

Waiting for it. Might learn a few things ..
Shador wrote: Could you post the content of the .live file here. It would also be useful if you try booting with 'debug' on the kernel cmdline. When you're dropped to a debugshell just continue. Try to look for lines like this:

Code: Select all

'/$IDENT_FILE:$IDENT_CONTENT' not found in $d
Especially try to catch whether the device with Salix on it appears.
This is the hint which may help solve the problem ... Discovered the SalixLive is looking for the salix-xfce-13.37-32.live-file on the hard disk only.

To make things clear : am booting from a ext4 formatted usb-stick which contains ao salix-xfce-13.37-32 and salixlive-13_1 which is recognized as /dev/sdc1/ . There is also an ntfs-3g formatted hard disk /dev/sda1 which I do not touch.
Booting salixlive-13_1 is no problem.

Booting now salix-xfce-13.37-32 with the 'debug' option :

Code: Select all

Finding salix Live v.xfce-13.37-32 device
Mounting /dev/sdc1 on /mnt/sdc1 with type 'ext2' and options ...
Mounting /dev/sda1 on /mnt/sda1 with type 'ntfs-3g' and options ...
/salix-xfce-13.37-32.live:88d818ae211826b61c7f038ab0e1dee1 not found in  /dev/sda1

Fatal Error
Could not find the distro to boot
File searched : salix-xfce-13.37-32.live
Content searched : 88d818ae211826b61c7f038ab0e1dee1
SalixLive is looking in the wrong place : the salix-xfce-13.37-32.live is on /dev/sdc1 not /dev/sda1.
Any idea how to force SalixLive to look for the '.live' file in the right place?

Thank you very much.
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: frugal install -- menu.lst for old grub version?

Post by JRD »

Ahhh, very helpfull output!

Seems that your ext4 usb partition is recognized as...ext2 as you can see it from this:

Code: Select all

Mounting /dev/sdc1 on /mnt/sdc1 with type 'ext2' and options ...
So I'm pretty sure the mounting fail, and so it cannot find the file "salix-xfce-13.37-32.live" on it.
When you have a shell (in debug) can you post the ouptput of the three following commands:

Code: Select all

# blkid
# cat /tmp/devices
# file -s -f /dev/sdc1
Thanks...I'm pretty sure I will find a fix with these output.
Image
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: frugal install -- menu.lst for old grub version?

Post by Shador »

Thanks, I can see now what's happening.
ikke wrote:Mounting /dev/sdc1 on /mnt/sdc1 with type 'ext2' and options ..
This mount fails (silently) because the partition is mistakenly detected as ext2 by file and thus checking the device is skipped. So it's trying to look there but can't. Could you check what a normal system's file outputs for that partition:

Code: Select all

file -s /dev/sdc1
What other fs did you previously have on that partition? It can happen that some misleading old information used to detect the fs is still there as they're location is not exactly standardized. So if we don't find anything you could try to recreate the ext4 fs on that partition.

For a start that file command of mine and the output JRD asked for should be a big help.
ikke wrote: Guess this is a grub2 entry for an Arch linux full install not frugal.
Yes, but for a frugal install it's just the kernel parameters that's different, right? And those entirely depend on the distro anyway.
Image
ikke
Posts: 263
Joined: 5. Feb 2010, 22:47

Re: frugal install -- menu.lst for old grub version?

Post by ikke »

JRD wrote:Ahhh, very helpfull output!

Seems that your ext4 usb partition is recognized as...ext2 as you can see it from this:
When you have a shell (in debug) can you post the ouptput of the three following commands:

Code: Select all

# blkid
# cat /tmp/devices
# file -s -f /dev/sdc1
Thanks...I'm pretty sure I will find a fix with these output.
Thank you very much JRD and Shador for prompt reaction. We might be on the right way ...

Code: Select all

# blkid 
Label="zangu_8M"
/dev/sdc1 UUID="64 ... f4"
/dev/sda1  UUID="46 ... FB"
/dev/ram0 "03 ... 7e"

#cat /tmp/devices
/dev/sdc1: Linux rev 1.0 ext2 filesystem (mounted or unclean) UUID="64 ... f4" (extents) (large files) (huge files)
/dev/sda1 X86 boot sector, code offset 0X52 OEM-ID "NTFS"  ...

#file -s /dev/sdc1
/dev/sdc1: Linux rev 1.0 ext2 filesystem (mounted or unclean) UUID="64 ... f4" (extents) (large files) (huge files)

#file -s -f /dev/sdc1
no reaction ...
have to <CTRL C> to go further.

Hope this helps.

Thank you for kind attention.
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: frugal install -- menu.lst for old grub version?

Post by JRD »

Yes sorry the "-f" was too much ;-)
Well...that confirms the problem.

Can you also do what Shador said, and issue the "file -s /dev/sdc1" in your actual OS (not the Live CD).
Seams like file has having a problem detecting your partition as ext4 instead of ext2.
Did you first create an ext2 partition on this partition, that at one point, you modified to ext4 afterwards ?

BTW, we need to find another refined option to find which version of ext is on a partition as file seems not reliable.

[Edit] Can you also do this

Code: Select all

# dd if=/dev/sdc1 of=first1M bs=1M count=1
and upload the file first1M somewhere for us to download, please ?
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: frugal install -- menu.lst for old grub version?

Post by JRD »

I found it!

I did this to reproduce:

Code: Select all

# dd if=/dev/zero of=ext4 bs=1M count=10 2>/dev/null && mkfs.ext4 -F ext4 >/dev/null 2>&1 && file ext4 && tune2fs -O ^has_journal ext4 && file ext4
ext4: Linux rev 1.0 ext4 filesystem data, UUID=e8052e1a-c68a-4e69-a801-2bd113194d68 (extents) (huge files)
tune2fs 1.41.14 (22-Dec-2010)
ext4: Linux rev 1.0 ext2 filesystem data, UUID=e8052e1a-c68a-4e69-a801-2bd113194d68 (extents) (huge files)
So file consider ext4 only if both the feature "extent" AND "has_journal" is present. So an ext4 filesystem without a journal is shown as ext2 with file...and with extents fetaure.

So I will modify the SaLT system to take care of such a case.

Ikke, to verify this, issue the following command as root (in your actual OS) and then try again the LiveCD:

Code: Select all

# tune2fs -j /dev/sdc1
You can add options "-c 0 -i 0 -m 0" if you do not want to have a check on it regularly and if you do not want to reserve some place for user root.
I'm pretty sure the LiveCD will now find your partition and boot it correctly.
Image
Post Reply