Page 1 of 1

user convenience

Posted: 29 Dec 2010, 18:51
by Burninbush
Hi all ...

Slax historically is missing a couple things I consider important --

1) a boot screen item to verify that your media is good -- md5sum checks. It would also be simple to add a text file under /slax [or whatever that comes to be named] with md5sums for the individual items; vmlinuz and initrd.lz, and then for each of the lzm files in /base

2) devise a method to capture the original mbr of a hard disk during any install script -- save it somewhere that it can be found for an easy restore.

Later,
bb

p.s. -- less important, but I'd also recommend going to grub as a boot util instead of isolinux / whatever.

Posted after 13 minutes 42 seconds:
And while I'm here ... is there any good reason at this time to continue to compile to i486 ??? Nobody is running slax or remix on a 486 box, I'll bet a week's pay on that. It would be hard to find one that would even hold enough memory. I suggest moving up to i686 -- it's possible there are a few PentiumPro users who still have boxes going. There were major instruction set improvements with the P5 vs the earlier 486, and then more when the P2 came along. We're talking 15 years ago, folks.

Later,
bb

Re: user convenience

Posted: 29 Dec 2010, 21:50
by brokenman
Welcome bb!

I have included a backup of boot sector in next release, along with a boot sector utility for restoring under win. I like the idea of an md5sum check at boot time although at this stage the user has already unpacked any compressed file and it may not be available on the file system they are using.

Re: user convenience

Posted: 30 Dec 2010, 00:29
by Burninbush
I like the idea of an md5sum check at boot time although at this stage the user has already unpacked any compressed file and it may not be available on the file system they are using. >jayflood

+++++++++++++++++

You know, as I think about it for a minute I realise I'm mixing up two different things.

A media check is the most important -- and there have to be small utils that will just essentially read the boot media and pipe it to null, the only functionality needed is to detect a crc error report from the disk system. I'll take a look at a recent Suse cd here to see if I can tell what they do. 90% certain that is all that [for example] k3b does when you check the box to verify a burn; the only error report you get is that "sector nnnnxxx" couldn't be read. But if all sectors can be read without crc error, then confidence is very high that the burn was successful. That is to say, an md5sum check is overkill for that problem.

The other thing I was thinking about would be to do what Knoppix [and probably other distros] do, which is simply to provide a text file that contains individual md5sums for all the pieces [and Knop goes much farther then is really needed]. That might address thousands of complaints to the Slax board that the system has gotten corrupted -- something that I figure is actually very rare for the basic parts [kernel, initrd, and base lzm files].

While on that topic, a command line that might be useful --

#dd if=/dev/sr0 bs=2048 conv=notrunc | md5sum

That will reproduce the iso's md5sum if a burn was good.

Re: user convenience

Posted: 30 Dec 2010, 19:21
by brokenman
It wouldn't be too difficult to pack each major component's md5 into the ISO and have them checked. Down side is a little more time on boot, and in the case of burning to CD/DVD no way to dump a marker file that says 'these files have already been checked, no need to recheck anymore'.

Re: user convenience

Posted: 30 Dec 2010, 21:56
by fanthom
i'm against this idea as user can modify every lzm himself - Jay even provided tools for it.
you just need to check md5sum of the ISO image, if it matches then all other components inside the ISO must be ok.

Re: user convenience

Posted: 30 Dec 2010, 23:35
by Burninbush
you just need to check md5sum of the ISO image, if it matches then all other components inside the ISO must be ok. >fanthom

++++++++++++++++

Yes, of course that's true. But what I was thinking about was a fairly regular complaint [Slax] that the base system has become corrupted with use. I'm very skeptical about those complaints, but how to be certain? It would be very little trouble to put a text file into /base with the md5sums of the distribution's lzm files, same for the kernel and initrd in /boot. A match would squelch any concern that the system had been corrupted. A user who purposely modifies his system might find it useful when debugging -- is this lzm one that I have changed?

OTOH, if those users are right, then it might be useful to you to know which files were modified.

As for the iso matching, there is plenty of opportunity for the burn operation to go badly -- why the media verification is important. I s'pose people running from a virtual windows environment wouldn't have that problem, but how many users run it that way?

Re: user convenience

Posted: 31 Dec 2010, 21:12
by brokenman
I would suggest an md5sum text file of all base modules be stored in base folder, and a simple script in /usr/bin called chkbase
If someone reports a problem and you suspect corruption then asking them to run chkbase would alleviate any suspicion of corrupt modules. Would this suffice?

Re: user convenience

Posted: 01 Jan 2011, 05:18
by fanthom
@Burninbush
WOW - great insight here. i forgot that corruption can be made even during simple copy/paste operation (especially on USB). you have convinced me, thanks :)

@Jay
the best idea would be to include /bin/chkbase inside initrd to do a check for each run. ofc it would slow down the boot as hell so i would go witch /usr/bin/chkbase in 001-core.

Well done with MBR guys :)