Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 02 Sep 2014, 01:15
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to force load alternate text editor mp - Minimum Profit
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
kethd

Joined: 20 Oct 2005
Posts: 451
Location: Boston MA USA

PostPosted: Tue 13 Dec 2005, 21:03    Post subject:  How to force load alternate text editor mp - Minimum Profit  

This shell script can be used to force load the alternate (to vi) text editor mp, Minimum Profit:
Code:
cp /mnt/floppy/mp /bin/
cp /mnt/floppy/libpcre.so /lib/libpcreposix.so.0
mkdir -p /usr/share/terminfo/l
cp /mnt/floppy/l/linux /usr/share/terminfo/l/

The Puppy boot process is described here:
http://www.pupweb.org/puppy/puppy-startup.htm

When your Puppy is not booting properly, you may choose to CTRL-C to a command prompt. rc.sysinit seems to contain most of the startup logic. But it is not smart enough to always work, and not dumb enough to just let you tell it what to do. You can try to study it to understand things, but changing it is a challenge, since it is packed into image.gz.

So, if you want to explore things at the half-booted point, you have only the command line, and also very limited tools, mostly just Busybox.

One option is to try to manually mount the full usr_cram.fs, described here:
http://www.murga.org/%7Epuppy/viewtopic.php?t=4626

But if that does not work, or you just want the simplicity of working directly at the lowest command line level from ram and floppy -- you may still want to avoid having to cope with the quirky standard vi editor (in Busybox).

Puppy includes mp (Minimum Profit 3.3.7 - http://triptico.com/software/mp.html ), which is simple enough to just stumble through (a simple text editor for dummies). But it is not normally available until the whole usr_cram.fs filesystem is successfully mounted.

The above script makes it possible to load the mp editor manually, and use it to explore your failed Pup system. I put the file on the Puppy freeDOS boot floppy (which has a lot of free space) named mp-load. To use it, I just boot to failed Pup, CTRL-C, then:
# mount /dev/fd0 /mnt/floppy
# /mnt/floppy/mp-load

Now that mp is loaded, to use it just:
# mp filename
and you will be in a simple screen editor.

For example, mp is good for making the above script file. In order for it to work, you will also need to have the three files needed to make mp work on the floppy. You will need a full-mounted Puppy to get access to the files. (But the GUI does not have to be running -- it is possible to set this all up from the command line.) You might want to use the find command to locate the files. The three files you will need are:
mp
libpcreposix.so.0
terminfo/l/linux

The whole issue with Linux binaries seems like an awful mess -- there seems to be no universal standard, so we are lucky we already have something in the standard-issue Pup to use. It is too bad Busybox does not include something like vi but more for dummies. Even the minimal mp used here is 160KB, over three times the size of trusty old MSDOS QEdit text-window editor, which works just fine for simple things.

System:
107alpha on 128MB flash-hd msdos partition, set up by 106
128MBram P-233MMX Compaq DP-2000 13dec05
Back to top
View user's profile Send private message 
kethd

Joined: 20 Oct 2005
Posts: 451
Location: Boston MA USA

PostPosted: Wed 14 Dec 2005, 10:16    Post subject:  

I discovered that mp does a much better job of viewing html files (like BusyBox.html) compared to piping to <more>.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0567s ][ Queries: 12 (0.0167s) ][ GZIP on ]