Boot 4.3 from EXT4?

Using applications, configuring, problems
Message
Author
User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

Boot 4.3 from EXT4?

#1 Post by Iguleder »

Is it possible to boot 4.3 from an EXT4 partition? pup-430.sfs isn't found.
I tried the following:
- With/out psubdir
- pup-430.sfs, pup_430.sfs, both, both on 2 partitions ...
- zdrv, here, there ...

I got 4.3 to boot from a flash drive, it works just fine, even reads my EXT4 partition.

The help pages and all documentation say that Puppy DOES boot from EXT4.

So ... Boot 4.3 from EXT4, is it possible?

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#2 Post by Jim1911 »

I haven't been able to boot a frugal installation from ext4 and have reported it on the 4.3 thread. Somewhere I read that the initrd.gz needs to be changed in order for it to be booted properly. I hope this does get corrected so pup has complete ext4 support. Next, we need pupsave files to be created in ext3/4.

united
Posts: 22
Joined: Sun 09 Nov 2008, 05:58

#3 Post by united »

I have puppy 4.3 installed on my netbook and it is a ext4 - boots just fine - however I have it as a full HD install and not frugal

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#4 Post by Jim1911 »

United,
Thanks, because of your post, I installed 430 on an old Sony laptop and it runs fine. It is a full HD installation on an ext4 partitition, created by 430's Gparted. Now all that's needed for complete ext4 support is to correct the initrd.gz, or whatever, so that a frugal installation is recognized and booted properly when installed on an ext4 partition.

Thanks,
Jim

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#5 Post by piratesmack »

Another possible solution would be to recompile the kernel with ext4 support built into it instead of compiling it as a module.

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#6 Post by Iguleder »

It has EXT4 support, but something is still wrong. 4.3 reads my EXT4 partition, but is unable to boot from it.

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#7 Post by piratesmack »

Iguleder wrote:It has EXT4 support, but something is still wrong. 4.3 reads my EXT4 partition, but is unable to boot from it.
Hm, you're right.
I'll take a look at the initrd and see if I can get it to work

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#8 Post by piratesmack »

Got it!

Just had to change something in the init script.
Replace your initrd.gz with the attached one and frugal + ext4 should work

Or if you want to fix the initrd yourself:

Extract it:

Code: Select all

gunzip initrd.gz
mkdir myinitrd && cd myinitrd
cpio -i --make-directories < ../initrd
Open the "init" file with a text editor and find this section:

Code: Select all

#######################FINDING PUPPY FILES###########################
echo -n "Searching for Puppy files in computer disk drives..." > /dev/console #STEP TWO
#locate all partitions (and superfloppy drives)...
PCPARTSALL="`probepart_init -k`"
PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'iso9660|ext2|ext3|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's/\/dev\///g'`"
PCPARTS="`echo "$PCPARTS0" | tr "\n" " "`" #note, will have a space char on end.
Or specifically, this line:

Code: Select all

PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'iso9660|ext2|ext3|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's/\/dev\///g'`"
Change it to:

Code: Select all

PCPARTS0="`echo "$PCPARTSALL" | grep '^/dev/' | cut -f 1-2 -d '|'  | grep -E 'iso9660|ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | sed -e 's/\/dev\///g'`"
And save

Now rebuild the initrd:

Code: Select all

find ./ | cpio -H newc -o > initrd
gzip initrd
That's it

EDIT:
It now boots from ext4, but still won't save to ext4
Will look into that

tulindo
Posts: 2
Joined: Tue 29 Sep 2009, 15:32

Saving to EXT4

#9 Post by tulindo »

Hi, piratesmack, did you manage to save to ext4?

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#10 Post by piratesmack »

No, I've been too busy.
I'll see if I can get it working tomorrow.

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#11 Post by piratesmack »

can anybody post their /etc/rc.d/rc.shutdown?

tulindo
Posts: 2
Joined: Tue 29 Sep 2009, 15:32

Save the session to ext4

#12 Post by tulindo »

Thanks to piratesmack's hint I managed to find the modification that allows to save session to ext4 partition.

Just open /etc/rc.d/rc.shutdown script and find the following line:

Code: Select all

PARTSLIST="`probepart -m 2> /dev/null | grep '^/dev/' | grep --extended-regexp 'ext2|ext3|reiserfs|msdos|vfat|minix|ntfs' | cut -f 1-3 -d '|' | sed -e 's/msdos/vfat/g'`"
and edit it (adding ext4) in this way:

Code: Select all

PARTSLIST="`probepart -m 2> /dev/null | grep '^/dev/' | grep --extended-regexp 'ext2|ext3|ext4|reiserfs|msdos|vfat|minix|ntfs' | cut -f 1-3 -d '|' | sed -e 's/msdos/vfat/g'`"
Please find attached the fixed script.

Hope it helps,
tulindo
Attachments
rc.shutdown.gz
fixed script.
(13.13 KiB) Downloaded 468 times

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#13 Post by Iguleder »

Awesome! :D
You should send this to Barry!

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#14 Post by piratesmack »

Thanks, tulindo

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#15 Post by Jim1911 »

piratesmack and tulindo,

Thanks for the fix on this problem. I posted a link to this topic on Barry's 4.3 topic. I hope that he will incorporate your fixes in his next releases. For the first time, frugal pup installations on an ext4 partition are usable.

The next problem to overcome is to be able to use pupsave.4fs save files on ext4 partitions.

Thanks again,
Jim

gyro
Posts: 1798
Joined: Tue 28 Oct 2008, 21:35
Location: Brisbane, Australia

pupsave.4fs

#16 Post by gyro »

Jim1911 wrote:The next problem to overcome is to be able to use pupsave.4fs save files on ext4 partitions.
The file system inside the pupsave file is not related to the file system the pupsave file resides in. (e.g. a pupsave.2fs file stored in an NTFS partition has an ext2 file system inside it.)

Most flexible if "init" implements the following naming scheme:
pupsave.2fs -> ext2
pupsave.3fs -> ext3
pupsave.4fs -> ext4

gyro

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#17 Post by piratesmack »

Well, I modified the puppy init script to also check for a pupsave.4fs. (but haven't tested it yet) Just need someone's rc.shutdown so I can modify it to create 4fs save file

Jim1911
Posts: 2460
Joined: Mon 19 May 2008, 20:39
Location: Texas, USA

#18 Post by Jim1911 »

tulindo's modified rc.shutdown is attached to his post on page 1.

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#19 Post by piratesmack »

lol, thanks :oops:

User avatar
piratesmack
Posts: 100
Joined: Wed 16 Sep 2009, 14:22

#20 Post by piratesmack »

Here it is

I just added a simple dialog menu that lets you select what filesystem you want to use for the save file.

Code: Select all

FILESYSTEM=`dialog \
--stdout \
--no-cancel \
--no-collapse \
--menu "Select a filesystem for your pupsave file" 0 0 0 \
ext2 "Second extended filesystem" \
ext3 "Third extended filesystem" \
ext4 "Fourth extended filesystem"`

....

JOPT=''
[ "$FILESYSTEM" = "ext3" ] && JOPT='-j'
[ "$FILESYSTEM" = "ext4" ] && JOPT='-t ext4'

mke2fs $JOPT blah blah blah
The save file will still be called pupsave.2fs, but will be formatted as whatever filesystem you choose. I tried to make it 2fs for ext2, 3fs for ext3, and 4fs for ext4, but that was too much work :P

I haven't gotten to test it yet, so let me know if it works.
Attachments
rc.zip
/etc/rc.d/rc.shutdown
(13.08 KiB) Downloaded 357 times

Post Reply