From: "Konstantin S. Uvarin" <khedin@mail.ru>
To: ALT Linux Community general discussions <community@lists.altlinux.org>
Subject: Re: [Comm] bad block на загрузочном секторе usb-драйва
Date: Sat, 22 Mar 2008 08:57:49 +0300
Message-ID: <200803220857.49884.khedin@mail.ru> (raw)
In-Reply-To: <47E41113.900@gmail.com>
On Friday 21 March 2008 22:48:35 Andrey Kutuzov wrote:
> Konstantin S. Uvarin пишет:
> > Можно еще попробовать что-то типа mount /dev/sdX /mnt/smth -o
> > loop,ro,offset=многобайт -- так, чтобы offset пришелся на начало
> > раздела
>
> Хм, а как определить этот самый offset? 512 байт - это MBR, а дальше ещё
> что-то есть? Пробовал монтировать с offset 512 и 32256 - бесполезно.
Я проверял вот какой командой:
# for i in `seq 1 1000`; do echo -n "$i:"; dd if=/dev/sdc bs=512 count=2
skip=$i | file -; done 2>/dev/null | grep -v ': data'
Что она делает: читает 2 сектора, начиная с разных оффсетов, определяет тип
прочитанного файла, и если это не "данные" -- печатает количество секторов,
на которое был сдвиг, и тип файла.
Соответственно в выводе будет и начало первой файловой системы:
63:/dev/stdin: x86 boot sector, Microsoft Windows 98 Bootloader
IO.SYS+MSDOS.SYS, code offset 0x3c, OEM-ID "MSWIN4.1", sectors/cluster 32,
root entries 512, Media descriptor 0xf8, sectors/FAT 256, heads 255, hidden
sectors 63, sectors 2047937 (volumes > 32 MB) , serial number 0x4c040460,
label: "USB DISK ", FAT (16 bit)
63*512 = 32256 как раз
и это число получалось на нескольких дисках...
--
Konstantin S. Uvarin
"Пароходом выехать не могу думаю баржей"
"Думайте головой выезжайте чем хотите"
next prev parent reply other threads:[~2008-03-22 5:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-14 20:46 Andrey Kutuzov
2008-03-15 6:08 ` Konstantin S. Uvarin
2008-03-15 6:25 ` Konstantin S. Uvarin
2008-03-21 19:48 ` Andrey Kutuzov
2008-03-22 5:57 ` Konstantin S. Uvarin [this message]
2008-03-22 6:58 ` Konstantin S. Uvarin
2008-03-29 20:20 ` Andrey Kutuzov
2008-03-15 8:59 ` ABATAPA
2008-03-21 19:52 ` Andrey Kutuzov
2008-03-29 10:19 ` ABATAPA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803220857.49884.khedin@mail.ru \
--to=khedin@mail.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git