Problems with CF preparing for ZS

Home Page Forums Network Management ZeroShell Problems with CF preparing for ZS

This topic contains 7 replies, has 0 voices, and was last updated by  xtacy 8 years, 7 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42615

    xtacy
    Member

    Hi!
    I have a problem with using CF for ZS installing.
    I have a brand new CF (Kingston CF/4Gb-S2) and wanna use it for ZS. So i did download several images for IDE/USB/CF 1Gb versions beta 12 and 13.
    Also i have a linux live cd (slax) under which i did dd:

    gunzip -c ZeroShell-1.0.beta13-CompactFlash-IDE-USB-SATA-1GB.img.gz | dd of=/dev/sdb1 bs=512

    After dd completed Slax still shows me CF as 1 VFAT partitioned media (WTH?).
    But i could c the CF structure using cfdisk. And it looks like:

                                            cfdisk (util-linux-ng 2.14.1)

    Disk Drive: /dev/sdb1
    Size: 3816497664 bytes, 3816 MB
    Heads: 32 Sectors per Track: 61 Cylinders: 3818

    Name Flags Part Type FS Type [Label] Size (MB)
    sdb1p1 Primary Linux ext3 14.00
    sdb1p2 Primary Linux 160.91
    sdb1p3 Primary Linux ext3 [Profiles] 839.52
    Pri/Log Free Space 2801.39

    ang i guess it’s ok. But there is no boot partition – why is that?
    That’s what i got from fdisk p:

    Disk /dev/sdb1: 3816 MB, 3816497664 bytes
    32 heads, 61 sectors/track, 3818 cylinders
    Units = cylinders of 1952 * 512 = 999424 bytes
    Disk identifier: 0x59eb2af7

    Device Boot Start End Blocks Id System
    /dev/sdb1p1 1 14 13633+ 83 Linux
    /dev/sdb1p2 15 175 157136 83 Linux
    /dev/sdb1p3 176 1015 819840 83 Linux

    it looks like something wrong with cylinders geometry and fdisk telling me abot it:

    The number of cylinders for this disk is set to 3818.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
    (e.g., DOS FDISK, OS/2 FDISK)

    I don’t know why and how 2 fix it. Maybe its the reason of my problem but i guess it is not.
    After boot fail (no boot media present or something like) i decided to make first partition bootable/active with fdisk a 1. And both fdisk:

         Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1p1 * 1 14 13633+ 83 Linux

    and cfdisk:

         sdb1p1           Boot            Primary       Linux ext3                                     14.00

    shows me that my 1st partition is bootable.
    But any of my 3 PCs (with 3 different cf-readers) wont boot with this CF saying there is no bootable media etc.
    As i correctly understood i should see 3 volumes(partitions) on my CF under linux and other OSes. But under WinXP I can’t c CF is partitioned. It shows me my CF as 1 partition 3.55Gb with RAW file system. Also after reboot Slax doesn’t show me my CF at all. To see the CF in Slax again i must previously format it under WinXP as FAT32. Maybe it is a feature of Slax which trying to use any flash cards as VFAT device, i dont know.
    I also tried to format CF as 1 partition with EXT2 filesystem under Slax:

    umont /dev/sdb1
    makefs.ext2 /dev/sdb1

    but after that slax refused to mount /dev/sdb1 with dmesg:

    FAT: bogus number of reserved sectors
    VFS: Can’t find a valid FAT filesystem on dev sdb1.

    Also after quick formatting the CF under WinXP fdisk (under Slax) shows me weird info:

    Disk /dev/sdb1: 3816 MB, 3816497664 bytes
    255 heads, 63 sectors/track, 463 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x6f20736b

    This doesn’t look like a partition table
    Probably you selected the wrong device.

    Device Boot Start End Blocks Id System
    /dev/sdb1p1 ? 48437 119493 570754815+ 72 Unknown
    Partition 1 has different physical/logical beginnings (non-Linux?):
    phys=(357, 116, 40) logical=(48436, 183, 40)
    Partition 1 has different physical/logical endings:
    phys=(357, 32, 45) logical=(119492, 104, 7)
    Partition 1 does not end on cylinder boundary.
    /dev/sdb1p2 ? 10501 131013 968014120 65 Novell Netware 386
    Partition 2 has different physical/logical beginnings (non-Linux?):
    phys=(288, 115, 43) logical=(10500, 111, 30)
    Partition 2 has different physical/logical endings:
    phys=(367, 114, 50) logical=(131012, 158, 28)
    Partition 2 does not end on cylinder boundary.
    /dev/sdb1p3 ? 116395 236907 968014096 79 Unknown
    Partition 3 has different physical/logical beginnings (non-Linux?):
    phys=(366, 32, 33) logical=(116394, 188, 12)
    Partition 3 has different physical/logical endings:
    phys=(357, 32, 43) logical=(236906, 234, 25)
    Partition 3 does not end on cylinder boundary.
    /dev/sdb1p4 ? 179626 179629 27749+ d Unknown
    Partition 4 has different physical/logical beginnings (non-Linux?):
    phys=(372, 97, 50) logical=(179625, 87, 47)
    Partition 4 has different physical/logical endings:
    phys=(0, 10, 0) logical=(179628, 203, 42)
    Partition 4 does not end on cylinder boundary.

    Partition table entries are not in disk order

    but the same info i’ve got from another and even not CF but SD-card.
    Anyway I could kill all those partitions (with strange warning):

    Command (m for help): d
    Partition number (1-4): 1
    Command (m for help): d
    Partition number (1-4): 2
    Command (m for help): d
    Partition number (1-4): 3
    Command (m for help): d
    Selected partition 4
    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 22: Invalid argument.
    The kernel still uses the old table.
    The new table will be used at the next reboot.
    Syncing disks.

    and even create new(with same warinig):

    Command (m for help): n
    Command action
    e extended
    p primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-463, default 1):
    Using default value 1
    Last cylinder, +cylinders or +size{K,M,G} (1-463, default 463):
    Using default value 463

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 22: Invalid argument.
    The kernel still uses the old table.
    The new table will be used at the next reboot.

    and after all i’ve got:

    Command (m for help): p

    Disk /dev/sdb1: 3816 MB, 3816497664 bytes
    255 heads, 63 sectors/track, 463 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x6f20736b

    Device Boot Start End Blocks Id System
    /dev/sdb1p1 1 463 3719016 83 Linux

    but after reboot Slax’s Konqueror saying me that CF still has VFS filesystem (in properties). How could it be?

    So the question is: what i did wrong and how 2 make the correct bootable partitioned CF?

    thanx

    #51023

    ppalias
    Member

    You can read the tutorial -> http://digilander.libero.it/smasherdevourer/schede/linux/Zeroshell%20su%20HD-EN.pdf
    It is the same for HD and CF.

    #51024

    xtacy
    Member

    @ppalias wrote:

    You can read the tutorial -> http://digilander.libero.it/smasherdevourer/schede/linux/Zeroshell%20su%20HD-EN.pdf
    It is the same for HD and CF.

    You probably didn’t read my post. The manual’s method is the same i already did several times. There is no difference between my method:

    gunzip -c ZeroShell-1.0.beta13-CompactFlash-IDE-USB-SATA-1GB.img.gz | dd of=/dev/sdb1

    and manual’s method:

    gunzip -c zeroshell.img>/dev/sdb1

    But anyway i tried it and it made same 3 partitions with same result. Making 1st partition active doesn’t change anything.

    But now i got the new result – GRUB loading error 17 which means something like “can’t mount selected partition”.

    I guess i need some tool to extract this img-file and do all the things manually including CF partitioning, making it bootable etc. Looks like there is something wrong with dd or my CF… Tried to make the CF on 2 different PCs with different card readers and with the same result…

    #51025

    ppalias
    Member

    I read your post and suggested another method which has worked for my case. Maybe there is something wrong with the CF. Can you try it on another CF or HD?

    #51026

    klontj
    Member

    If you have a windows xp or windows 7 setup you might try using physdiskwrite to write the zeroshell embedded image to the cf card. I have used this method many times and it has always worked for me. Physdiskwrite will automatically uncompress and write the image to the cf card.You must be careful to choose the correct drive when writing the image or you can mistakenly overwite your main drive.
    Here are a few links that may help you:

    http://www.zeroshell.net/eng/net5501/

    http://www.zeroshell.net/eng/forum/viewtopic.php?p=633&sid=b1bc1fe622da2b975b347b28fbac7bd6

    http://m0n0.ch/wall/physdiskwrite.php

    http://doc.m0n0.ch/quickstartpc/setup-installing.html

    Write a .img to a Compact Flash with Physdiskwrite

    #51027

    xtacy
    Member

    At last!
    The key is CF need to b not partitioned at all just like HDD. But that is the thing which i couldnt do for a long time. Every time i boot linux CF mounts as hdc1(ZS) or sdb1(slax). But with no partitions it would b just hdc or sdb without any digit.
    I had a problem with unpartitioning my CF. But somehow under ZS booted from CD and with help of fdisk/cfdisk (4 weird ghost partitions was deleted) i get ability to deletethe main partition but in WinXP! Or i just dont know how2 do it in linux cause fdisk/cfdisk was unable to do it. And i did it in WinXP with admin tools. After that i boot ZS from CD again and my CF was seen by fdisk -l like /dev/hdc (not hdc1 like it was b4) and i did gunzip -c ZeroShell-1.0.beta13-CompactFlash-IDE-USB-SATA-1GB.img.gz>/dev/hdc from usb-stick and tada! it works now!

    And the same with HDD – before boot any live linux and doing anything like dd or gupzip>/dev/hdd you must kill all the partitions on this HDD. But with HDDs its much easier 2do. Even with admin tools in WinXP or with any partitioning soft.

    Yes, linux is free but it takes a lot of your time…

    PS when i got stuck i tried physdiskwrite under WinXP and it didnt help. I choose correct usb drive for it but got no changes on CF. It was just damn waste of my time. And any other win programs that acts like linux’s dd (flashnul, dd tool) also didnt help. And linux methods like dd 2 dev or gunzip 2 dev also. now i know why.

    thanx for replies!!!

    #51028

    ppalias
    Member

    CF is treated like a normal hard disk in terms of partitioning and formating. I don’t know what went wrong with cfdisk and you could not erase your partitions (maybe they were mounted?). In general when you are doing an operation on the disk you need to omit the partition number.

    #51029

    xtacy
    Member

    @ppalias wrote:

    CF is treated like a normal hard disk in terms of partitioning and formating.

    It’s not true if CF used via card-reader. Many partition programs just cant c the CF as a drive in that case. When using CF via CF2IDE adapter it is true. But i had problems anyway.
    Also I tried to unmount CF before running fdisk/cfdisk but they doesn’t see the CF at all in that case.
    Well, maybe it because I’m a lamer in *nix OSes… Maybe its due to SLAX is not the best choice of live Linux for such things. But I bet its all about my CF which got some low-level/system bug due to WinXP admin disk tool’s actions. I got such negative experience with new Transcend 4Gb SD-card (not SDHC!) which loses its initial capacity (thanx again to WinXP admin disk tool’s). Now it’s size is about 3Gb and there is nothing i can do but i tried a few tools like SDFormatter, SDFixCapacity etc. and also i tried to format it using HTPC, smartphone, camera etc.

    #51030

    ppalias
    Member

    I have used CFs, SDs etc on various low budget card readers without any problem. Once you plug them in, they should be recognized by the system (if you run the “dmesg” command you’ll see the name it has got and the partitions,if any). After it has been recognized by the system you can treat it like any other disk. Usually it will have the name “/dev/sdX” due to the fact that is mounted as usb device.
    Even 3GB is more than adequate for ZS if that is any relief to you.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.