Bug#704198: syslinux doesn't rewrite backup boot sector

2013-05-23 Thread Daniel Baumann
retitle 704198 please reformulate warning about backup boot sector
reassign 704198 dosfstools
severity 704198 wishlist
tag 704198 upstream
thanks

---snip---
[...]
2013-05-14 15:52:53  dba does anyone have an opinion on 'syslinux
doesn't rewrite backup boot sector' aka
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704198 ?
2013-05-14 15:56:44 -!- Jack_CM (realname) [~antonio@151.65.228.30] has
joined #syslinux
2013-05-14 15:57:35  hpa dba: this is arguably true for FAT32,
although this is partly a reflection of the ugly conflation of the FAT
superblock and the boot sector
2013-05-14 15:57:47  hpa I would argue that dosfsck is a bit
overzealous here
2013-05-14 15:59:16  hpa However, if someone wants to *positively*
identify FAT32 and if detected, copy the boot sector into sector 6 with
appropriate safeguards (including verifying the number of reserved
sectors) I'd take the patch
2013-05-14 16:10:50 -!- Bry8Star3
[~Bry8Star3@gateway/shell/elitebnc/x-myremoejfpvibivt] has quit [Excess
Flood]
2013-05-14 16:11:28 -!- Bry8Star3 (I'm part of the Elite... EliteBNC)
[~Bry8Star3@gateway/shell/elitebnc/x-fmffmrrrsggpgvog] has joined #syslinux
2013-05-14 16:29:17 -!- Ady3 [~a...@igld-84-228-75-144.inter.net.il] has
left #syslinux []
2013-05-14 16:31:54 -!- Ady2 (Ady)
[~a...@igld-84-228-75-144.inter.net.il] has joined #syslinux
2013-05-14 16:39:33  dba hpa: ok, thanks (will adjust dosfsck in
future then)
2013-05-14 16:49:29 -!- ridikulus_rat (Keshav Padram)
[~keshavpad@117.202.179.171] has joined #syslinux
2013-05-14 16:51:10  hpa dba: it is something which can be argued
either way
2013-05-14 16:51:28  hpa dba: it makes sense as a warning, probably
not as an error htough
2013-05-14 16:52:24  dba hpa: yes, i'll craft the message in dosfck
that way. thanks
2013-05-14 17:17:38  hpa Thanks!
[...]
---snap---

-- 
Address:Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email:  daniel.baum...@progress-technologies.net
Internet:   http://people.progress-technologies.net/~daniel.baumann/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#704198: syslinux doesn't rewrite backup boot sector

2013-03-29 Thread Ian Bruce
Package: syslinux
Version: 3:4.05+dfsg-6+deb7u2
Severity: normal
Tags: upstream

After installing Syslinux on a USB flashdrive:

syslinux -d /boot/syslinux/ -i /dev/sde1

as described here:

http://www.syslinux.org/wiki/index.php/SYSLINUX#Linux

-- I found that dosfsck, from the dosfstools package, isn't happy
about it:

# dosfsck /dev/sde1
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offset:original/backup)
...

This doesn't seem to prevent booting from the partition, but such errors
are disconcerting, and presumably the backup is there for a reason.

There is some discussion of the technical issues involved here:

http://en.wikipedia.org/wiki/File_Allocation_Table#Technical_design

For FAT32 file systems, the reserved sectors include a File System
Information Sector at logical sector 1 and a Backup Boot Sector at
logical sector 6. While many other vendors have continued to utilize
a single-sector setup (logical sector 0 only) for the bootstrap
loader, Microsoft's boot sector code has grown to spawn over logical
sectors 0 and 2 since the introduction of FAT32, with logical sector
0 depending on sub-routines in logical sector 2. The Backup Boot
Sector area consists of three logical sectors 6, 7, and 8 as well.

-- but the basic problem seems clear enough. If Syslinux writes its
bootloader code into the VFAT boot sector, shouldn't it write a
duplicate copy into the backup area?

I have attached a copy of the first 32 (512-byte) sectors of the
flashdrive partition in question, in case anybody wants to investigate
this problem in detail, although it shouldn't be difficult to replicate.


-- Ian Bruce



-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), 
(500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages syslinux depends on:
ii  libc62.13-38
ii  libuuid1 2.20.1-5.3
ii  syslinux-common  3:4.05+dfsg-6+deb7u2

Versions of packages syslinux recommends:
ii  mtools  4.0.17-1

Versions of packages syslinux suggests:
ii  dosfstools  3.0.13-1
ii  os-prober   1.42

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org