cfdisk, don't know designation of the CF-card


Forum: HD Install
Topic: cfdisk, don't know designation of the CF-card
started by: bartgrefte

Posted by bartgrefte on Mar. 01 2009,20:09
Hi!

Recently I got myself a mITX board (< MSI IM-945GSE-A >) and a Mini-Box M300LCD case with a CF->PATA convertor in it.

Now it was my intention to do a frugal install of DSL on a 2GB Kingston CF-card (couldn't get one with smaller/lower capacity) but I can't start installing.

The CF-card has to be partitioned first, I know I must use cfdisk for that, but... I don't know the designation (hda/hdb/sda/etc) of the CF-card.

What I do know is that sda1 and sda2 are being used by the USB-flash-drive were DSL will be installed from.

Already tried several of those designations, but cfdisk can't find the CF-card, but it does find the USB-flash-drive.

Any idea what now?


With regards,

Bart Grefte

ps, CF-card is being recognized by the BIOS.

Posted by bartgrefte on Mar. 03 2009,13:50
Well, the CF-card was designated as hdc ???

Still couldn't use cfdisk, gave an error, so tried sudo mkfs hdc.
Then tried cfdisk again, which didn't gave an error this time and claimed the CF-card to have no partition on it, so I created one with cfdisk.

Then I did the frugal grub install, which wend okay, I think.

Anyway, when I tried booting from the CF-card, the system gave the "no bootdevice detected" error....

Did I do something wrong?

Posted by mikshaw on Mar. 03 2009,17:32
When you created the partition, did you set the boot flag on it?  This is done in cfdisk, and as far as I know it can be done to an existing non-boot partition that already contains data.
Posted by bartgrefte on Mar. 04 2009,12:34
Yeah, I did...

But just in case I started over, but now I can't install DSL ???
Get "Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]
Sorry, system has not detected a linux partition."

I already took a look in the Official DSL Book, see if I missed something, but that doesn't cover installing DSL from a from USB-stick running DSL...

Posted by bartgrefte on Mar. 09 2009,21:19
Anyone?
Posted by bartgrefte on Mar. 16 2009,15:15
*kick*
Posted by mikshaw on Mar. 16 2009,19:59
Quote
Still couldn't use cfdisk, gave an error, so tried sudo mkfs hdc.
Then tried cfdisk again, which didn't gave an error this time and claimed the CF-card to have no partition on it, so I created one with cfdisk.
Not sure if this helps, but it looks like you tried to create a filesystem without first having a partition. If cfdisk failed, there would be no partition on which to create the filesystem.

When you tried cfdisk (sudo cfdisk /dev/hdc), what error did you get?

Posted by bartgrefte on Mar. 16 2009,20:47
I got that.

Ehm... Forgot :P
But that doesn't matter now. There's something weird going on here.

When I create partition(s) with cfdisk at the DSL running from my USB-stick, then format it/them with "sudo mkfs.ext2 /dev/hdc1", I still get the "Warning: start=63....." error I mentioned earlier. Yes, rebooted the system after the cfdisk and mkfs command.

Now the weird part.
When I but the CF-card in a cardreader connected to my laptop, and do the same things, cfdisk/mkfs, in Kubuntu.... I don't! get the "Warning: start=63....." error when I run the Frugal Grub install again after I put the CFcard back in the PATA->CF convertor.

But, now I have the same as in my 2nd post in this topic: no bootable device detected.

So I mounted the CF-card at the "USB-stick-DSL", didn't see anything, no files/folders...

So now what?

Posted by mikshaw on Mar. 17 2009,10:49
Have you ever successfully booted the mini-box using the converter?  Maybe it's not bootable from CF?
I'm just guessing now...don't know anything about it really.

Posted by bartgrefte on Mar. 17 2009,12:29
I think it should be bootable, BIOS recognizes the 2GB CF-card as storage device and it's in the bootmenu where you can select the device to boot from.
Although never booted anything. Started with DSL as soon as I got that computer.

But there's nothing to boot, no files on the CF-card.
The installer didn't gave an error:rock:

edit: Ah damn, now I can't even get the installer to work anymore.

Few posts back I got "Warning: start=63 - this looks like a partition rather than the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]
Sorry, system has not detected a linux partition."
Now I get the same error , only now with 62 instead of 63...

Posted by bartgrefte on Mar. 17 2009,21:13
Now another error when trying to start the frugal grub install:

"sfdisk: read error on /dev/hdc1 - cannot read sector 0
Sorry, system has not detected linux partition."

What I did differently, appearantly to get that error, is this:
I created one big EXT2 partition on another computer with the help of Acronis Disk Director Suite v10.
At first I still got that "Warning: start=63" error, but then I did "sudo mkfs.ext2 /dev/hdc1" followed by a reboot.
Then I got that new error.

Edit: ran sfdisk. It saw the EXT2 partition, let it write the partition table, followed by a reboot.

Now I get this:
"Warning: start=1 - ", rest is the same as before.

Posted by humpty on Mar. 17 2009,22:37
hmm, it sounds like something wrong with the CF card.

i always blank out the bootsector before a format;
dd if=/dev/zero of=/dev/hdc bs=512 count=1

you know, can just use fdisk to format :
>sudo fdisk /dev/hdc
delete whatever partitions are there.
add a new primary partition (it defaults it to ext2)
write it.

use emelfm filemanager to see if you can mount it (right-click-mount)
copy some files to it just to see if it's ok.
unmount it

then do a frugal grub install on it (hdc1).

I have 2 Kingstons 2GB (they're really toshiba's, but you probably already know that). they're usually very reliable, so i'm quite surprised.

i just did a pendrive install on one of them just to see if it works and the only problem i had was that the installer could'nt find the linux24 or minirt24.gz,
but that's cos i boot the pen from freedos. i copied these 2 files to the boot/
directory of the kingston and grub boots okay.

as a last resort, you could try freedos instead of grub;
< http://petepr.drivehq.com/dsl/guides/guides_idiots.html#Boot_LoadLin >
you might need to use fdisk to switch on the boot flag.

Posted by bartgrefte on Mar. 18 2009,00:28
Quote
hmm, it sounds like something wrong with the CF card.

All three of them?
Have three identical 2GB Kingston's... (< these >)
All of them give those errors when I try a frugal install.

Also wanted to try the cdrom from the official DSL book, maybe that one works?, but can't.
The USB->PATA/SATA adapter I got, sit's partially in the way of the cdrom-power connector. Gonna try something else later.

Quote
i always blank out the bootsector before a format;
dd if=/dev/zero of=/dev/hdc bs=512 count=1

Tried that couple of times...

Quote
you know, can just use fdisk to format :
>sudo fdisk /dev/hdc
delete whatever partitions are there.
add a new primary partition (it defaults it to ext2)
write it.

fdisk? Wait, I've been using cfdisk, this evening sfdisk once (no clue how that one works, after pressing ENTER a few times it showed the EXT2 partition and 3 0MB ones?!?!, and wrote the partition table).
Gonna try fdisk when I wake up again. (almost 1:30AM now...)

Quote
use emelfm filemanager to see if you can mount it (right-click-mount)
copy some files to it just to see if it's ok.
unmount it

then do a frugal grub install on it (hdc1).

Okay, gonna try that to.

Quote
I have 2 Kingstons 2GB (they're really toshiba's, but you probably already know that). they're usually very reliable, so i'm quite surprised.

Ehh, didn't know that, I do now :P

Quote
i just did a pendrive install on one of them just to see if it works and the only problem i had was that the installer could'nt find the linux24 or minirt24.gz,
but that's cos i boot the pen from freedos. i copied these 2 files to the boot/
directory of the kingston and grub boots okay.

Pendrive install... What's the difference with a frugal install if that happens to work over here?

Quote
as a last resort, you could try freedos instead of grub;
< http://petepr.drivehq.com/dsl/guides/guides_idiots.html#Boot_LoadLin >
you might need to use fdisk to switch on the boot flag.

Well, changing bootloader (or what's it called) won't help since I can't get DSL installed...
Anyway, someone recommended me to try installing Grub, just that, to check if the computer can boot it.

Posted by bartgrefte on Mar. 18 2009,12:39
Well... Tried fdisk, then mounted it with that filemanager, copied the knoppix folder, that went without problems.
Unmounted it, that took a lot longer though than mounting it, and then started the installation again:......
""Warning: start=63 - etc..."

Installing grub:
Got it installed succesfully, so it seems, didn't get errors. (uses < this > method)
But after trying to boot from the CFcard, I get a blinking cursor, then "no bootable device detected".
Back in DSL I mounted the CFcard, no grub files/folders...

Posted by bartgrefte on Mar. 18 2009,19:09
This is just...

Had an idea.
"MacGyver'd" an external cdrom player together -> disassembled a PATA-HDD USB case and used the USB->PATA converter pcb to connect an old cdrom player to the miniITX system.
Then downloaded the most recent DSL (4.4.10) and burned it on a cd to try it out.

1st attempt: no linux FS found (no errorcode or anything)
Ran cfdisk, which found an ext2 partition, wrote the partitiontable without changing anything.
2nd attempt: installation succesful! There are even files present, grub too, but cf-card is still not bootable. Grub won't load, no error, just no bootable device detected.
An yes, I did < this >...

Posted by humpty on Mar. 18 2009,23:11
>"Warning: start=63 - etc..."
That just means sfdisk doesn't like the partition.

> ?Pendrive install... What's the difference with a frugal install ...
Sorry, I meant when the installer asks you from what source you want the files to copy from (I guess you chose from pendrive).

So you managed to get a 'nice' partition and the files copied and the only problem left is the boot ?

I never liked grub, I think it's the least reliable booter per device/bios.

You can try freedos+loadlin (now that you go your cd-rom working), or syslinux.
All three bootloaders (grub, freedos, syslinux) will try to load linux24 and minirt24.gz.
All three support a config file that does this. You'll have to google a bit to know the syntax they use.

syslinux - boots quite well, but does not have it's own live cd, it's available on some distos but unfortunately not on DSL4.4. You can try to download it, but i found the binary doesn't work. And I couldn't compile it either. (I had to use the win32 version).

freedos - most reliable boot (my opinion). comes on a bootable cd. But you also need loadlin. and I would also recommend the Ranish Partion Manager.

Posted by bartgrefte on Mar. 19 2009,13:57
Quote
>"Warning: start=63 - etc..."
That just means sfdisk doesn't like the partition.

Okay.

Quote
> ?Pendrive install... What's the difference with a frugal install ...
Sorry, I meant when the installer asks you from what source you want the files to copy from (I guess you chose from pendrive).

Ah :)
Yes, that's what I chose.
But now chose livecd, since I'm using a DSL cdrom now with my improvised external cdrom player.

Quote
So you managed to get a 'nice' partition and the files copied and the only problem left is the boot ?

Yes :)
Appearantly the cfdisk of the USBdrive didn't do thinks like it should (I think). The CFdisk of the livecd worked perfectly at the 1st(!) attempt.

Quote
I never liked grub, I think it's the least reliable booter per device/bios.

Hmm

Quote
You can try freedos+loadlin (now that you go your cd-rom working), or syslinux.
All three bootloaders (grub, freedos, syslinux) will try to load linux24 and minirt24.gz.
All three support a config file that does this. You'll have to google a bit to know the syntax they use.

syslinux - boots quite well, but does not have it's own live cd, it's available on some distos but unfortunately not on DSL4.4. You can try to download it, but i found the binary doesn't work. And I couldn't compile it either. (I had to use the win32 version).

freedos - most reliable boot (my opinion). comes on a bootable cd. But you also need loadlin. and I would also recommend the Ranish Partion Manager.

Thanks for the tips!
But I'm kinda hoping I can get Grub to work.
Since I already know a thing or two about it...

Anyway, just to rule out a cause, I managed to get the BIOS to display the CFcard as primary master and DSL recognized it as hda
Didn't help, even after reinstalling DSL+grub.

edit:
Just thinking out loud here. It's not because I've made one big partition?

Posted by bartgrefte on Mar. 20 2009,13:45
Well, this problem gets weirder.

To rule out GUB, I tried installing DSL with the Frugal Lilo installer.
Same result, files present, but no bootable device.

Then I tried connecting the CF->PATA adapter to a different computer, one with a Gigabyte GA-GC230D motherboard.

With the GRUB DSL I get this:
GRUB with blinking cursor.
Then with "Loading stage1.5"
Followed by "GRUB loading, please wait" and that's it.

Lilo DSL:
L  with a blinking cursor, nothing more.

Then I tried it with a < Sweex CR006 USB cardreader >, still with the computer with the Gigabyte motherboard.

GRUB works!
Then tried starting DSL. Wend okay till it got at "scanning for USB devices". It said "done" right after that, but then I got this:
"Can't find KNOPPIX filesystem, sorry.
Dropping you to a (very limited) shell.
Press reset button to quit.

Additional builtin commands avaliable
 cat       mount       umount
insmod   rmmod        lsmod"
(Could be me, but am I noticing some wrongwritten stuff there? This is exactly what whas displayed)

Lilo: same as with the CF->PATA.

I have no clue where to go from here.

edit:
Connected the USB cardreader to the MSI board.
Grub won't load, get some smileylike symbol on the screen. See < http://www.jimprice.com/ascii-dos.gif > , the symbol directly under the "1" that's in the top-row.
Lilo: works, but ends up with the same error as Grub above.

Someone just told me thats because de USB cardreader is sdx not, hdx.

Still doesn't explain what's going on now.

Anyway, found someone with an "old" 64MB CF-card for sale.
Gonna buy it and see what that one does. Just checking if an older CF-card with GRUB on it boots in the CF->PATA adapter connected to the MSI bord.

Posted by humpty on Mar. 22 2009,18:24
if you install using a CF->PATA adapter, it configs GRUB to try to find the KNOPPIX image from hda1 (or hdc1 ?).

if you then use a USB adapter, the partition becomes sda1,2 or 3 depending what you have already plugged in. so it can't find the KNOPPIX image.

you have to edit the GRUB config file and change the hdxn to sdxn.

you can also try the other way around. i.e a usbpen install with the usb adapter , see if it boots, then edit the config file and boot with the CF->PATA.

Posted by bartgrefte on Mar. 22 2009,19:21
Quote (humpty @ Mar. 22 2009,18:24)

Quote
if you install using a CF->PATA adapter, it configs GRUB to try to find the KNOPPIX image from hda1 (or hdc1 ?).

if you then use a USB adapter, the partition becomes sda1,2 or 3 depending what you have already plugged in. so it can't find the KNOPPIX image.

you have to edit the GRUB config file and change the hdxn to sdxn.

I know, see the edit of previous post.

Quote
you can also try the other way around. i.e a usbpen install with the usb adapter , see if it boots, then edit the config file and boot with the CF->PATA.

Don't think that will help, since both GRUB and Lilo succesfully boot using the USB-cardreader.


Anyway, also tried installing Windows XP on a CF-card while it's in the PATA->CF reader. After the installation reboots the system and the GUI of the installation should start (from CF) it says no bootable device detected.
Do I place the CF in the cardreader, I get an error message from Windows, basicly the Windows version of the error I got from DSL.
But! It boots, just not in the PATA->CF reader.

So it's not a problem with DSL, or Windows XP for that matter, but what is? ???

I'm thinking incompatiblity issue between BIOS and the PATA->CF reader when it comes to booting from it.
Already contacted MSI about this, and Mini-Box too.

Posted by Tobiaus on Mar. 23 2009,04:19
message removed
Posted by humpty on Mar. 24 2009,03:06
Quote (Tobiaus @ Mar. 23 2009,12:19)
Quote (humpty @ Mar. 18 2009,23:11)
syslinux - boots quite well, but does not have it's own live cd, it's available on some distos but unfortunately not on DSL4.4.

< http://distro.ibiblio.org/pub....md5.txt >

you mean this version has 'syslinux' available as a 'command' (sbin/syslinux) ?

i didn't know that.

Posted by humpty on Mar. 24 2009,03:14
Quote (bartgrefte @ Mar. 23 2009,03:21)
So it's not a problem with DSL, or Windows XP for that matter, but what is? ???

I'm thinking incompatiblity issue between BIOS and the PATA->CF reader

as a matter of interest, what is geometry the report from >sudo sfdisk /dev/hdx
?
is it
Code Sample

Disk /dev/hda: 2063 MB, 2063597568 bytes
64 heads, 63 sectors/track, 999 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

Posted by Tobiaus on Mar. 24 2009,06:46
message removed
Posted by bartgrefte on Mar. 24 2009,13:04
Quote (humpty @ Mar. 24 2009,03:14)

as a matter of interest, what is geometry the report from >sudo sfdisk /dev/hdx
?
is it
Code Sample

Disk /dev/hda: 2063 MB, 2063597568 bytes
64 heads, 63 sectors/track, 999 cylinders
Units = cylinders of 4032 * 512 = 2064384 bytes

I get this after "sudo sfdisk /dev/hda":
Code Sample
Disk /dev/hda: 245 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225200 bytes, blocks of 1024 bytes, counting from 0.

Beneath that it shows 4 partitions ??? , but hda2/3/4 are empty/0bytes in size. Get that with both the Lilo DSL as with the GRUB DSL (got them installed on sepperate CF-cards, Windows XP too, although XP didn't get to the 2nd part of the installation since it can't boot)

Got word back from MSI. They think that the PATA->CF adapter is incompatible with the motherboard. They've tried to use one too, only different one, but it works when they tried.
Curious what could be incompatible, since I can see, in the BIOS, the brand/size/typeofcard without problems. The PATA->CF adapter should display the CF-card as a standard harddrive, so no clue what could go wrong there.

Still no word from Mini-Box though, send another email (with some additions from what I've done/tried/posted here)...

Posted by humpty on Mar. 25 2009,02:40
does the CF->PATA adapter look anything like the left one of this
< http://petepr.drivehq.com/cf/cf_types.html >
?

Posted by bartgrefte on Mar. 25 2009,11:37
I've got this one: < http://www.mini-box.com/s.nl/it.A/id.294/.f?sc=8&category=1080 >

Model from 2003.

Posted by bartgrefte on Mar. 26 2009,15:43
Think I've got something :)

Managed to get an old 64MB SanDisk CF-card.
In the bootmenu it's displayed as "HDD: PM-SanDisk SDCFB-64", so this one is recognized like it should, not as a SATA device...

Installing DSL was out of the question though, 64MB appearantly isn't enough, and since the bootloader won't be installed till the end of the installation when there isn't enough room left...
So I tried installing GRUB manually.

Instead of "no bootable device detected" I get a blinking cursor and that's it.
Keep in mind that GRUB didn't work when I put the 2GB CF-card with GRUB-DSL in the Sweex USB cardreader and showed that weird symbol character I mentioned somewhere in this topic.
But GRUB did work on another computer.

So I tried LILO, since that one would boot when I put the 2GB LILO-DSL CF-card in the USB cardreader.

Well... anyone got a clue about installing LILO manually without error? -> When I copied the /etc/lilo.conf file to the CF-card and did "sudo lilo -M /dev/hda", I got:
"Fatal: creat /boot/boot.0300: Read-only file system"

No clue what I did wrong (or forget), but if that error can't be solved, there are some 128MB and 256MB SanDisk CF-cards on there way. If those are recognized properly as well, I can run the frugal install script again (those CF-cards will have enough capacity) and see if it works then.

edit: tried GRUB again, this time installed it in the MBR of the CF-card. Now I get that smiley-like symbol, so it boots from CF (more or less) instead of giving a "no bootable device detected" error.

Posted by bartgrefte on April 11 2009,17:15
Damn Small Linux is working :)

Managed to find a more recent model of the compactflash adapter, which is able to boot my 2GB Kingston's.

So DSL works, with LILO.
GRUB still shows that smileything.

Anyway, next thing is getting the two onboard Intel® 82574L GbE NIC's to work and figure out how let DSL save the settings to the compactflash card since the toram option makes DSL run from the RAM...

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.