booting from an sdcard

Using applications, configuring, problems
Post Reply
Message
Author
aarf

booting from an sdcard

#1 Post by aarf »

booting from an sdcard
fat32 ok. ext3 not ok.

grub is on sda1 of internal SSD
new sandisk 2G sdcard is the internal reader at sdb.
puppeerc2 and lupu525 are in seperate directories on sdb1 which has an ext3 file system.
puppeerc2 is also on sdb4 with fat32 file system.



fat32 partition will boot with no flag, and with boot flag.

ext3 partition will not boot, everything i have tried gives as the first message to appear "Error 2: Bad file or directory type" for both puppeeerc2 and lupu525.

what boot flag needs to be set in gparted to get ext3 partition to boot? or is it something else that i am failing to do or notice.
i want to have all ext3 partitions and erase the fat32 partition.

grub booting with

Code: Select all

title lupu525 on sdb1
root (hd1,0)
kernel /lupu525b1/vmlinuz phome=lupu525b1 psubdir=lupu525b1 pfix=fsck
initrd /lupu525b1/initrd.gz

 title puppeeerc2 on sdb1
root (hd1,0)
kernel /puppeeerc2b1/vmlinuz phome=puppeeerc2b1 psubdir=puppeeerc2b1 pfix=fsck
initrd /puppeeerc2b1/initrd.gz

title puppeeerc2 on sdb4
root (hd1,3)
kernel /puppeeerc2b4/vmlinuz phome=puppeeerc2b4 psubdir=puppeeerc2b4 pfix=fsck
initrd /puppeeerc2b4/initrd.gz
attached is fat32 partition successfully booted.
I have copied the lupu525 files from the sdb1 ext3 partition back to sda2 which is an ext3 partition with boot flag on located on the SSD and they successfully boot from there so there is nothing wrong with the files on the sdb1 ext3 partition.
Attachments
sdb1.jpg
(45.85 KiB) Downloaded 2151 times
Last edited by aarf on Thu 28 Apr 2011, 21:15, edited 2 times in total.

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#2 Post by rhadon »

Hi aarf,

can't see any fault. It should work. It did all the time for me. On my basic sdhc card I use only ext3. And I used grub (and mbr on this card) for a long time. Now I have grub4dos and mbr on sda1 (removed xp complete and formatted with ext3).

If grub and mbr is on sda, boot flag on sdb doesn't matter (AFAIK).

Most time I also used the minimal grub commands, like

Code: Select all

title lupu525 on sdb1 
 root (hd1,0) 
 kernel /lupu525b1/vmlinuz psubdir=lupu525b1 
 initrd /lupu525b1/initrd.gz
Don't know 'phome'.

Would recommend to to delete sdb1 completely, build a new partition, format with ext3 and copy lupu 525 back and try again (if you didn't already).

HTH

Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#3 Post by Béèm »

phome= was used in puppy 1.xx
Now it's pmedia
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

aarf

#4 Post by aarf »

Deleted phome. no change. Will try rebuilding the partition later. SDcard is SD not SDHC. My internal cardreader eats SDHC.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#5 Post by rcrsn51 »

GRUB Error 2 is the 128 byte inode issue. Read here. But I'm not sure if this applies to your situation.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#6 Post by bigpup »

I think your Grub entries are the problem.
The kernel entries look wrong.
I use Grub4dos to set up the boot loader.
Here is what mine look like.

# Frugal installed Puppy

title Lupu 525 (sda3/puppy525)
find --set-root --ignore-floppies --ignore-cd /puppy525/initrd.gz
kernel /puppy525/vmlinuz pmedia=atahd psubdir=puppy525 pfix=fsck
initrd /puppy525/initrd.gz

title Lupu 525 (sda3/puppy525) RAM mode\nBoot up Puppy without pupsave
find --set-root --ignore-floppies --ignore-cd /puppy525/initrd.gz
kernel /puppy525/vmlinuz pmedia=atahd psubdir=puppy525 pfix=ram,fsck
initrd /puppy525/initrd.gz

title Lupu 525 (sdb1)
uuid 2aa70712-17d0-4335-ba3c-0b3a5fa0b20d
kernel /vmlinuz pmedia=usbflash pfix=fsck
initrd /initrd.gz

# Full installed Linux

title Lucid Puppy 525 good(sda2/boot)
uuid afe7e00e-0410-458e-928c-8f0c7e6ec419
kernel /boot/vmlinuz root=/dev/sda2 ro

title Linux Mint 8 Helena - Main Edition (sda7)
uuid 2a7dc791-ef27-4a70-ae9e-f59d14bdfa18
kernel /vmlinuz root=/dev/sda7 ro
initrd /initrd.img

If it was me I would use Grub4dos bootloader config program in Lucid Puppy 5.25 to set up the menu.lst for grub.
It is very good at finding everything and making the proper entries.

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#7 Post by rhadon »

aarf,

it's possible, that I also used pmedia=usbflash in menu.lst. :oops:

Can't remember exact, and my usbhd for backups crashed and bye bye ~750GB backups :evil:

Rolf

Edit: Just tested on my Eee with grub4dos and mbr on sda1=internal memory chip, Puppeee on sdc2=SDHC:
I removed pmedia=usbflash and it boots also fine.
So in my case it doesn't seem to be necessary.
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

aarf

#8 Post by aarf »

rcrsn51 is correct diagnosis. 256 is the problem. fixed using puppy301 to create the ext3 partition. Details later. My grub is ordinary and old.
Thanks all.

aarf

#9 Post by aarf »

notes as going through. read in conjunction to rcrsn51's link above
note that mkfs.ext3 -l 128 /dev/sdb1 doesnt work.

in puppeee4.4rc2

Code: Select all

# mkfs.ext3 -l 128 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
83424 inodes, 333039 blocks
16651 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=343932928
11 block groups
32768 blocks per group, 32768 fragments per group
7584 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912

read_bad_blocks_file: No such file or directory while trying to open 128
# tune2fs -l /dev/sdb1
tune2fs 1.41.12 (17-May-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.
#
file system is "unknown" in gparted. built new ext file system in gparted and it was 256.

switch to lupu525.

Code: Select all

# mkfs.ext3 -l 128 /dev/sdb1
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
83424 inodes, 333039 blocks
16651 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=343932928
11 block groups
32768 blocks per group, 32768 fragments per group
7584 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912

read_bad_blocks_file: No such file or directory while trying to open 128
# tune2fs -l /dev/sdb1
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.
# 
rebuild in gparted > Inode size:256

switch to puppy301

rebuild filesystem to ext3 without deleting the 256 ext3 partion > inode size : 128
try to mount partition >see image.
reinsert sdcard > same as image.
delete partition. rebuild ext3.
reinsert sdcard.
copy lupu525 and puppeee4,4rc2 to partition.
check and is 128.

lupu525 and puppeee4,4rc2 both boot ok with existing menu.lst code above..
Attachments
301.jpg
(60.97 KiB) Downloaded 2246 times

aarf

#10 Post by aarf »

unknown contribution to the problem from SD not SDHC, and is ext3 on flash drive ok? also unknown contribution from my old grub.
need clarification from those who successfully boot grub4dos if their inode size is 256 or 128.
which puppy were the successful ext3 partitions built with.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#11 Post by rcrsn51 »

note that mkfs.ext3 -l 128 /dev/sdb1 doesnt work.

Code: Select all

mkfs.ext3 -I 128 /dev/sda1  (with an upper case i)
If you use a lower case ell instead of an upper case eye, you get your error message.

aarf

#12 Post by aarf »

rcrsn51 wrote:
note that mkfs.ext3 -l 128 /dev/sdb1 doesnt work.

Code: Select all

mkfs.ext3 -I 128 /dev/sda1  (with an upper case i)
If you use a lower case ell instead of an upper case eye, you get your error message.
ok thanks for the clarification i assumed it would be the same ell as in

Code: Select all

tune2fs -l /dev/sdb1
i had puppy301 handy so didnt mess with it.

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#13 Post by rhadon »

On my SDHC card inode size is 128.
Can't remember which Puppy/Gparted I used.
Don't think there's a difference between SD and SDHC for this problem.

Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

cthisbear
Posts: 4422
Joined: Sun 29 Jan 2006, 22:07
Location: Sydney Australia

#14 Post by cthisbear »

" booting from an sdcard "

Maybe a weird Fat32 formatting issue.
I've seen this a few times.

"""""""""

http://murga-linux.com/puppy/viewtopic.php?t=59633

Why it just pays to run GParted in Puppy Linux
and reformat your USB.

As usual backup your data before doing the above.

""""""

Believe it or not many USBs come out with weird Fat32 formatting.

I don't know what the agenda is but some products
show up in GParted in Puppy Linux with a strange looking triangle.

""""""

An example was an 8 gig Medion usb.

I installed Puppy to it and I the ran >> Gparted
to right click on it to >> Manage Flags.

But the USB had a strange question mark on it....
even though it was formatted in Fat32.
I have seen this behavior on some other USB brands as well.

I was trying to get the Medion usb to boot Puppy 4.3.1
Gparted refused to let me tick >> Boot ...and ....LBA.....
which are essential.

I had to reformat it in NTFS because GParted refused
to allow Fat 32 formatting on it.

After the above I closed GParted and then reformatted the USB
back to Fat32 and enabled ...Boot and LBA.

Then Puppy 4.3.1 booted after re-installing to USB.

Camera Card issues.
I bought a 2 gig camera card...for an ALDI car radio.
Featured USB or SD card option to play music.

I tried to install 2 gigs of music to it.
It would not allow more than 1.7 gigs.
I tried it in Puppy...checked that it was >> Fat32.
Yes...but there again was that strange question mark.

I downloaded a Panasonic Card formatter 4 Windows.
Reformatted it...but the same problem.

Booted Puppy...ran GParted..formatted to >> Fat 32
checked LBA and boot....copied the full 2 gigs and >> drumroll...
the card now works in the radio. "

Chris.

Post Reply