Команда IT специалистов выполнит подготовку инфраструктуры для вашего бизнеса.
Внедрение самых передовых решений и технологий.
Поддержка и сопровождение ваших сервисов.
Выполнение работ под "ключ", от покупки сервера, до настройки автоматизации процессов.
8(977)608-78-62 adm@nixm.ru

Большая проблема с флэшкой на linux

sda1
Разговорчивый гость
Разговорчивый гость
Сообщения: 34
Зарегистрирован: 06 июн 2016, 14:27

Re: Большая проблема с флэшкой на linux

Сообщение sda1 »

Код: Выделить всё

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./bootlace.com /dev/sdb1

Error: Invalid partition table. Must specify --floppy explicitly for floppy.

BOOTLACE writes GRLDR BOOT RECORD to MBR or to the boot area of a file system.
Usage:  bootlace.com  [OPTIONS]  DEVICE_OR_FILE
Options: --read-only, --floppy[=N], --boot-prevmbr-first, --boot-prevmbr-last,
--no-backup-mbr, --force-backup-mbr, --mbr-enable-floppy, --mbr-disable-floppy,
--mbr-enable-osbr, --mbr-disable-osbr, --duce, --time-out=T, --hot-key=K, 
--preferred-drive=D, --preferred-partition=P, --sectors-per-track=S, --heads=H,
--start-sector=B, --total-sectors=C, --install-partition=I, --lba, --chs,
--fat12, --fat16, --fat32, --vfat, --ntfs, --ext2, --serial-number=SN,
--restore-mbr, --mbr-no-bpb, --chs-no-tune
DEVICE_OR_FILE: Filename of the device or image. For DOS, a BIOS drive number
(in hex 0xHH or decimal DDD format)can be used to access the drive.
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
mkfs.vfat: /dev/sdb1 contains a mounted filesystem.
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# umount /dev/sdb
umount: /dev/sdb: not mounted
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# umount /dev/sdb1
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# fdisk -l
Начались серьёзные баги :cry:

Код: Выделить всё

/dev/sdb1  *     2048 7821311 7819264  3,7G  c W95 FAT32 (LBA)
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./bootlace.com /dev/sdb1
bash: ./root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#: No such file or directory
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# 
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# Error: Invalid partition table. Must specify --floppy explicitly for floppy.
Error:: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# 
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# BOOTLACE writes GRLDR BOOT RECORD to MBR or to the boot area of a file system.
BOOTLACE: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# Usage:  bootlace.com  [OPTIONS]  DEVICE_OR_FILE
Usage:: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# Options: --read-only, --floppy[=N], --boot-prevmbr-first, --boot-prevmbr-last,
Options:: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# --no-backup-mbr, --force-backup-mbr, --mbr-enable-floppy, --mbr-disable-floppy,
--no-backup-mbr,: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# --mbr-enable-osbr, --mbr-disable-osbr, --duce, --time-out=T, --hot-key=K, 
--mbr-enable-osbr,: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# --preferred-drive=D, --preferred-partition=P, --sectors-per-track=S, --heads=H,
--preferred-drive=D,: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# --start-sector=B, --total-sectors=C, --install-partition=I, --lba, --chs,
--start-sector=B,: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# --fat12, --fat16, --fat32, --vfat, --ntfs, --ext2, --serial-number=SN,
--fat12,: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# --restore-mbr, --mbr-no-bpb, --chs-no-tune
--restore-mbr,: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# DEVICE_OR_FILE: Filename of the device or image. For DOS, a BIOS drive number
DEVICE_OR_FILE:: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# (in hex 0xHH or decimal DDD format)can be used to access the drive.
bash: syntax error near unexpected token `in'
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat /dev/sdb1
bash: root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#: No such file or directory
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.fat 3.0.28 (2015-05-16)
bash: syntax error near unexpected token `('
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat: /dev/sdb1 contains a mounted filesystem.
No command 'mkfs.vfat:' found, did you mean:
 Command 'mkfs.vfat' from package 'dosfstools' (main)
mkfs.vfat:: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# umount /dev/sdb
bash: root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#: No such file or directory
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# umount: /dev/sdb: not mounted
No command 'umount:' found, did you mean:
 Command 'umount' from package 'mount' (main)
umount:: command not found
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# umount /dev/sdb1
bash: root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#: No such file or directory
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat /dev/sdb1
bash: root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#: No such file or directory
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.fat 3.0.28 (2015-05-16)
bash: syntax error near unexpected token `('
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# fdisk -l
bash: root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#: No such file or directory
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# 
Аватара пользователя
diablopc
Разговорчивый гость
Разговорчивый гость
Сообщения: 22
Зарегистрирован: 05 июл 2016, 15:42

Re: Большая проблема с флэшкой на linux

Сообщение diablopc »

Изображение
Изображение
Изображение
Изображение
Изображение

Код: Выделить всё

cd /home/mike/Загрузки/grub4dos-0.4.4

Код: Выделить всё

dd if=grldr.mbr of=/dev/sdb bs=446 count=1

Код: Выделить всё

dd if=grldr.mbr of=/dev/sdb seek=512 skip=512 bs=1

Код: Выделить всё

mount /dev/sdb1 /mnt

Код: Выделить всё

cp * /mnt
Сын спрашивает отца-линуксоида:- Пап, а вирусы под линукс есть?
- Есть, но всего 5, и их сначала нужно откомпилировать под свою систему, дать права на запуск и запустить.
sda1
Разговорчивый гость
Разговорчивый гость
Сообщения: 34
Зарегистрирован: 06 июн 2016, 14:27

Re: Большая проблема с флэшкой на linux

Сообщение sda1 »

Вот смотрите всё делаю правильно

Форматирую новоиспечённый раздел на /dev/sdb1 root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#

Код: Выделить всё


Вот вывод fdisk -l

[code]root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sda: 74,5 GiB, 80026361856 bytes, 156301488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x545506b7

Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 39064547 39062500 18,6G 83 Linux
/dev/sda2       39065598 62894079 23828482 11,4G  5 Extended
/dev/sda5       39065600 43362303  4296704  2,1G 82 Linux swap / Solaris
/dev/sda6       43364352 62894079 19529728  9,3G 83 Linux


Disk /dev/mapper/cryptswap1: 2 GiB, 2199388160 bytes, 4295680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 3,7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa063aeeb

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 7821311 7819264  3,7G  b W95 FAT32
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# 
Пробую записать загрузочную область :evil:

Код: Выделить всё

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./bootlace.com

Error: No command-line arguments specified.

BOOTLACE writes GRLDR BOOT RECORD to MBR or to the boot area of a file system.
Usage:  bootlace.com  [OPTIONS]  DEVICE_OR_FILE
Options: --read-only, --floppy[=N], --boot-prevmbr-first, --boot-prevmbr-last,
--no-backup-mbr, --force-backup-mbr, --mbr-enable-floppy, --mbr-disable-floppy,
--mbr-enable-osbr, --mbr-disable-osbr, --duce, --time-out=T, --hot-key=K, 
--preferred-drive=D, --preferred-partition=P, --sectors-per-track=S, --heads=H,
--start-sector=B, --total-sectors=C, --install-partition=I, --lba, --chs,
--fat12, --fat16, --fat32, --vfat, --ntfs, --ext2, --serial-number=SN,
--restore-mbr, --mbr-no-bpb, --chs-no-tune
DEVICE_OR_FILE: Filename of the device or image. For DOS, a BIOS drive number
(in hex 0xHH or decimal DDD format)can be used to access the drive.
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mkfs.vfat /dev/sdb1
mkfs.fat 3.0.28 (2015-05-16)
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# fdisk -l /dev/sdb1
Disk /dev/sdb1: 3,7 GiB, 4003463168 bytes, 7819264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# fdisk -l /dev/sdb
Disk /dev/sdb: 3,7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa063aeeb

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *     2048 7821311 7819264  3,7G  b W95 FAT32
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./bootlace.com --fat32 /dev/sdb1

Error: Invalid partition table. Must specify --floppy explicitly for floppy.

BOOTLACE writes GRLDR BOOT RECORD to MBR or to the boot area of a file system.
Usage:  bootlace.com  [OPTIONS]  DEVICE_OR_FILE
Options: --read-only, --floppy[=N], --boot-prevmbr-first, --boot-prevmbr-last,
--no-backup-mbr, --force-backup-mbr, --mbr-enable-floppy, --mbr-disable-floppy,
--mbr-enable-osbr, --mbr-disable-osbr, --duce, --time-out=T, --hot-key=K, 
--preferred-drive=D, --preferred-partition=P, --sectors-per-track=S, --heads=H,
--start-sector=B, --total-sectors=C, --install-partition=I, --lba, --chs,
--fat12, --fat16, --fat32, --vfat, --ntfs, --ext2, --serial-number=SN,
--restore-mbr, --mbr-no-bpb, --chs-no-tune
DEVICE_OR_FILE: Filename of the device or image. For DOS, a BIOS drive number
(in hex 0xHH or decimal DDD format)can be used to access the drive.
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./bootlace.com --vfat /dev/sdb1

Error: Invalid partition table. Must specify --floppy explicitly for floppy.

BOOTLACE writes GRLDR BOOT RECORD to MBR or to the boot area of a file system.
Usage:  bootlace.com  [OPTIONS]  DEVICE_OR_FILE
Options: --read-only, --floppy[=N], --boot-prevmbr-first, --boot-prevmbr-last,
--no-backup-mbr, --force-backup-mbr, --mbr-enable-floppy, --mbr-disable-floppy,
--mbr-enable-osbr, --mbr-disable-osbr, --duce, --time-out=T, --hot-key=K, 
--preferred-drive=D, --preferred-partition=P, --sectors-per-track=S, --heads=H,
--start-sector=B, --total-sectors=C, --install-partition=I, --lba, --chs,
--fat12, --fat16, --fat32, --vfat, --ntfs, --ext2, --serial-number=SN,
--restore-mbr, --mbr-no-bpb, --chs-no-tune
DEVICE_OR_FILE: Filename of the device or image. For DOS, a BIOS drive number
(in hex 0xHH or decimal DDD format)can be used to access the drive.
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# 

ВОТ ОШИБКА!!
DEVICE_OR_FILE: Filename of the device or image. For DOS, a BIOS drive number
(in hex 0xHH or decimal DDD format)can be used to access the drive.
Аватара пользователя
diablopc
Разговорчивый гость
Разговорчивый гость
Сообщения: 22
Зарегистрирован: 05 июл 2016, 15:42

Re: Большая проблема с флэшкой на linux

Сообщение diablopc »

Пробую записать загрузочную область :evil:

Код: Выделить всё

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ./bootlace.com[/quote]

Щито это?!!!!

Сделай ТУПО в том порядке что я тебе написал, без fdisk и ололо

А, да, и еще, на всякий, стяни заново архив с grub4dos
Сын спрашивает отца-линуксоида:- Пап, а вирусы под линукс есть?
- Есть, но всего 5, и их сначала нужно откомпилировать под свою систему, дать права на запуск и запустить.
sda1
Разговорчивый гость
Разговорчивый гость
Сообщения: 34
Зарегистрирован: 06 июн 2016, 14:27

Re: Большая проблема с флэшкой на linux

Сообщение sda1 »

diablopc писал(а):Изображение
Изображение
Изображение
Изображение
Изображение

Код: Выделить всё

cd /home/mike/Загрузки/grub4dos-0.4.4

Код: Выделить всё

dd if=grldr.mbr of=/dev/sdb bs=446 count=1

Код: Выделить всё

dd if=grldr.mbr of=/dev/sdb seek=512 skip=512 bs=1

Код: Выделить всё

mount /dev/sdb1 /mnt

Код: Выделить всё

cp * /mnt

Так я не понял в чём прикол!Вчера делал по этому способу так как прочёл на хабрахабре.Надо было просто загрузочным его не делать? :evil: И получилось только сейчас пойду проверять. Пишут что надо сделать загрузочным в fdisk а на самом деле не надо было :x :x :x
Аватара пользователя
diablopc
Разговорчивый гость
Разговорчивый гость
Сообщения: 22
Зарегистрирован: 05 июл 2016, 15:42

Re: Большая проблема с флэшкой на linux

Сообщение diablopc »

Пишут что надо сделать загрузочным в fdisk а на самом деле не надо было :x :x :x
Ибо gparted первый primary раздел и так метит как загрузочный.
Сын спрашивает отца-линуксоида:- Пап, а вирусы под линукс есть?
- Есть, но всего 5, и их сначала нужно откомпилировать под свою систему, дать права на запуск и запустить.
Olej

Re: Большая проблема с флэшкой на linux

Сообщение Olej »

sda1 писал(а): Вчера делал по этому способу так как прочёл на хабрахабре.
А не надо копаться по помойкам! :wall:
Аватара пользователя
diablopc
Разговорчивый гость
Разговорчивый гость
Сообщения: 22
Зарегистрирован: 05 июл 2016, 15:42

Re: Большая проблема с флэшкой на linux

Сообщение diablopc »

Olej писал(а):А не надо копаться по помойкам!
Да не, просто инструкции нужно читать целиком и внимательно, а не через одну букву.

ЗЫ
Напомнило старый анекдот: "Все инструкции должны начинаться со слов "ну что, сцуко, сломал"?"
Сын спрашивает отца-линуксоида:- Пап, а вирусы под линукс есть?
- Есть, но всего 5, и их сначала нужно откомпилировать под свою систему, дать права на запуск и запустить.
sda1
Разговорчивый гость
Разговорчивый гость
Сообщения: 34
Зарегистрирован: 06 июн 2016, 14:27

Re: Большая проблема с флэшкой на linux

Сообщение sda1 »

diablopc писал(а):
Пишут что надо сделать загрузочным в fdisk а на самом деле не надо было :x :x :x
Ибо gparted первый primary раздел и так метит как загрузочный.
Сейчас сделал эксперимент и на fdisk тоже всё работает!
Отформатировал и сделал вот так

Код: Выделить всё

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): m

Help:

  DOS (MBR)
   a   toggle a bootable flag
   b   edit nested BSD disklabel
   c   toggle the dos compatibility flag

  Generic
   d   delete a partition
   F   list free unpartitioned space
   l   list known partition types
   n   add a new partition
   p   print the partition table
   t   change a partition type
   v   verify the partition table
   i   print information about a partition

  Misc
   m   print this menu
   u   change display/entry units
   x   extra functionality (experts only)

  Script
   I   load disk layout from sfdisk script file
   O   dump disk layout to sfdisk script file

  Save & Exit
   w   write table to disk and exit
   q   quit without saving changes

  Create a new label
   g   create a new empty GPT partition table
   G   create a new empty SGI (IRIX) partition table
   o   create a new empty DOS partition table
   s   create a new empty Sun partition table


Command (m for help): p
Disk /dev/sdb: 3,7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Command (m for help): o
Created a new DOS disklabel with disk identifier 0x90c2ab02.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-7821311, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-7821311, default 7821311): 

Created a new partition 1 of type 'Linux' and of size 3,7 GiB.

Command (m for help): p
Disk /dev/sdb: 3,7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x90c2ab02

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        2048 7821311 7819264  3,7G 83 Linux

Command (m for help): t
Selected partition 1
Partition type (type L to list all types): l

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris        
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden or  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx         
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data    
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility   
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt         
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access     
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O        
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor      
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi ea  Rufus alignment
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         eb  BeOS fs        
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ee  GPT            
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        ef  EFI (FAT-12/16/
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f0  Linux/PA-RISC b
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f1  SpeedStor      
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f4  SpeedStor      
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      f2  DOS secondary  
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fb  VMware VMFS    
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fc  VMware VMKCORE 
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fd  Linux raid auto
1c  Hidden W95 FAT3 75  PC/IX           bc  Acronis FAT32 L fe  LANstep        
1e  Hidden W95 FAT1 80  Old Minix       be  Solaris boot    ff  BBT            
Partition type (type L to list all types): b
Changed type of partition 'Linux' to 'W95 FAT32'.

Command (m for help): p
Disk /dev/sdb: 3,7 GiB, 4004511744 bytes, 7821312 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x90c2ab02

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        2048 7821311 7819264  3,7G  b W95 FAT32

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4#
bottlace.com не работает!Можно даже не пытатся через него так сделать

Код: Выделить всё

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# dd if=grldr.mbr of=/dev/sdb bs=446 count=1
1+0 records in
1+0 records out
446 bytes copied, 0,00479189 s, 93,1 kB/s
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# dd if=grldr.mbr of=/dev/sdb seek=512 skip=512 bs=1
8704+0 records in
8704+0 records out
8704 bytes (8,7 kB, 8,5 KiB) copied, 0,0518909 s, 168 kB/s
И вот оно чудо

Код: Выделить всё

root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# mount /dev/sdb1 /mnt
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# cp * /mnt
cp: omitting directory 'chinese'
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# ls /mnt
badgrub.exe             config.sys  grldr      grub.pif    README_GRUB4DOS.txt
bootlace.com            COPYING     grldr.mbr  hmload.com
ChangeLog_GRUB4DOS.txt  default     grub.exe   menu.lst
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# umount /mnt
root@home-pc:/home/mike/Загрузки/grub4dos-0.4.4# 
Загрузочным не надо было делать и всё :x .А я там все инструкции перечитал :evil:
Гады сидят на хабрахабре :twisted:
Зато изучил программу fdisk польностью :twisted: :twisted: :twisted:
sda1
Разговорчивый гость
Разговорчивый гость
Сообщения: 34
Зарегистрирован: 06 июн 2016, 14:27

Re: Большая проблема с флэшкой на linux

Сообщение sda1 »

diablopc писал(а):
Olej писал(а):А не надо копаться по помойкам!
Да не, просто инструкции нужно читать целиком и внимательно, а не через одну букву.

ЗЫ
Напомнило старый анекдот: "Все инструкции должны начинаться со слов "ну что, сцуко, сломал"?"
Здесь написано https://habrahabr.ru/post/253260/ - "На флешке создать первичный раздел и пометить его, как «загрузочный»; "
В fdisk это буква a.Но этого на самом деле не надо было делать :lol: А в документации fdisk было написано так сделать чтоб раздел стал загрузочным :lol:
А на самом деле инструкции бывают ошибочными :evil: :evil: Всё можно закрывать теперь тему может она кому-то потом поможет
Ответить

Вернуться в «Решаем трудности вместе»