Re: disk labels mismatch

2013-02-19 Thread Bob Proulx
pavicic wrote:
 This problem has been solved but since some points might be of
 general interest even to Debian developers here is a report on the
 issue.

Good to hear it has been solved for you.

 To summarize: There are 3 disks on the machine sda, sdb, sdc. Debian
 Sid is installed on sda.  sdb is _not_ mounted but contained an
 older installation of Debian Squeeze.
 ...
 The problem was that grub saw that old installation on sdb
 although sdb was _not_ mounted.  For example, I deleted grub.cfg and
 updated grub and all old installations from sdb would
 reapear. Equally so during booting.
 ...
 I would say that this is something that should be 
 changed. Grub simply should not read unmounted disks.  

This is actually a feature that other people rely upon to work.  For
example people who dual boot multiple systems expect the update-grub
script to search and automatically detect those other systems.  If
update-grub didn't locate those then these other people would have the
opposite problem to yours.  They would then no longer have an
automatically provided boot option for those systems.

Since these are conflicting features there is no way to satisfy both
at the same time.

Bob


signature.asc
Description: Digital signature


Re: disk labels mismatch

2013-02-19 Thread pavicic
On Tue, Feb 19, 2013 at 11:57:28AM -0700, Bob Proulx wrote:
  The problem was that grub saw that old installation on sdb
  although sdb was _not_ mounted.  For example, I deleted grub.cfg and
  updated grub and all old installations from sdb would
  reapear. Equally so during booting.
  ...
  I would say that this is something that should be 
  changed. Grub simply should not read unmounted disks.  
 
 This is actually a feature that other people rely upon to work.  For
 example people who dual boot multiple systems expect the update-grub
 script to search and automatically detect those other systems.  If
 update-grub didn't locate those then these other people would have the
 opposite problem to yours.  They would then no longer have an
 automatically provided boot option for those systems.

Do you want to say that they can boot from a disk which is not mounted?

Mladen. 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130219190907.ga21...@grad.hr



Re: disk labels mismatch

2013-02-18 Thread pavicic

Hi!

This problem has been solved but since some points 
might be of general interest even to Debian developers 
here is a report on the issue. 

To summarize: There are 3 disks on the machine
sda, sdb, sdc. Debian Sid is installed on sda. 
sdb is _not_ mounted but contained an older 
installation of Debian Squeeze.

The problem was that grub saw that old installation 
on sdb although sdb was _not_ mounted. For example, 
I deleted grub.cfg and updated grub and all old 
installations from sdb would reapear. Equally so 
during booting. 

At the beginning I thought that was the problem of 
the MBR at sdb but Bob Proulx and Igor Cicimov helped 
in excluding that option. Then I reformated sdb and, 
of course, the installations were no more. 

I would say that this is something that should be 
changed. Grub simply should not read unmounted disks.  

Best, 

Mladen. 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130218214247.gb29...@grad.hr



Re: disk labels mismatch

2013-02-18 Thread Ralf Mardorf

On Mon, 18 Feb 2013 22:42:48 +0100, pavicic pavi...@grad.hr wrote:

updated grub


So you updated grub automatically, not manually ;)?

I always write my grub.cfg or menu.lst myself, doing this I can chose the  
entries, the way I need them. It might be impossible, but at least it  
would be much, much work, to set up this automatic update thingy, to fit  
to my needs.


Regards,
Ralf

PS: Take a look at your mail client, perhaps it does support reply to  
list only by the preferences, many users are nor aware of this option.



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

Archive: http://lists.debian.org/op.wsp662z3qhadp0@freebsd



Re: disk labels mismatch

2013-02-18 Thread Slavko
Hi,

Dňa Mon, 18 Feb 2013 22:42:48 +0100 pavicic pavi...@grad.hr napísal:

 The problem was that grub saw that old installation 
 on sdb although sdb was _not_ mounted. For example, 
 I deleted grub.cfg and updated grub and all old 
 installations from sdb would reapear. Equally so 
 during booting. 

IMHO os-prober is checking all MBR and not only MBR on mounted
devices... You can consider to fill the bugreport about this.

i have uninstalled os-prober for a long time :-)

regards

-- 
Slavko
http://slavino.sk


signature.asc
Description: PGP signature


Re: disk labels mismatch

2013-01-20 Thread Bob Proulx
pavicic wrote:
 I've added a new disk in a hurry and now I have several mismatches.
 Would anyone care to help me to sort them out. Below I'm giving fstab,
 fdisk -l, df -la (apparently / (root) is duplicated ??, etc.). I
 also enclose relevant sections from /var/log/system and grub. Each
 section starts with ***

Only the fstab data was useful.  All of the rest of that data you sent
is pretty much useless data.  None of it will help us or you determine
anything useful.  Sorry.

The /etc/fstab you sent included (with some readability fixup by me):

# / was on /dev/sda1 during installation
UUID=2b4e1ed6-4b09-4c42-a958-9493cffa7f58 / ext3 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=a3cb2cbb-d6db-46e1-a0e7-73f264d255a1 /home ext3 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=25c7fb6d-47a4-4594-9cfd-20e9680f5e0b none swap sw 0 0 /dev/scd0

That is unambiguous!  The partitions with those UUIDs are mounted as
shown.

  UUID=2b... is mounted on /.
  UUID=a3... is mounted on /home
  UUID=25... is used as swap.

The entire purpose of the UUIDs is to handle just the case you are
asking about.  The case where you have installed a system on two
different disks and then install both disks in the same system.
Without the UUIDs it is ambiguous.  But since the UUIDs will be unique
it means that the correct disk will be mounted.

Use the blkid program to print out the UUIDs of the disks on your
system.  Example:

  $ blkid
  /dev/sda1: LABEL=boot UUID=a72b4b9b-eb92-49a3-b64c-29e47ad8ba0d 
TYPE=ext2 
  /dev/sda2: UUID=e515fbe8-0ac0-4bdf-95f2-573eacdd286a TYPE=swap 
  /dev/sda5: UUID=cf27b371-bb12-44bb-a5f2-deca5d65cb20 TYPE=ext3 

Line up the UUIDs with the ones from your fstab.  Those are the ones
in use.

 The system works without apparent problems but I do not have a clear
 correspondence between disks sda, sdb. sdc and directories / , /run/,
 etc. I would like to establish correspondence (and, e.g., have only
 sda, sdb, and sdc in fstab, and have only one /) so as to be able to
 optimally use the space on the disks and avoid possible duplication of
 system files. For instance, does the appearance of two / mean that

Your question confuses me very much.

If you are noticing that your 'df' command produces two lines for /
this is due to a change from using /etc/mtab as a file to being a
symlink to /proc/mounts.  If you look in /proc/mounts you will see
that the / filesystem is listed twice.

  $ awk '$2==/' /proc/mounts
  rootfs / rootfs rw 0 0
  /dev/mapper/v1-root / ext3 
rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0

Since it is listed twice it is reported twice.  This is a minor
regression in behavior due to the change to the symlink.  This will
eventually get improved but for the moment just ignore it.

 optimally use the space on the disks and avoid possible duplication of
 system files. For instance, does the appearance of two / mean that
 systems files are written on both sda and sdb? If so, how can sort
 that out.

No.  It does not.

 Some more details. sdb is not mounted but I can easily mount
 it. Then I'll have two / two /home etc.

What?  No.

 This is because sdb is from an old system.

Just because it is an old system does not cause it to be a duplicate.

 The problem is that I'm afraid to reformat sdb because it has a
 bootable label

So?  What does a bootable label matter?  It does not matter at all.
Please unlearn that piece of incorrect knowledge.

 and sdc as well.

Why mention sdc here?  You clearly have a system installed on
/dev/sda{1,2,3}.  That is all that is relevant here.

 So, the first thing I would like to find out is which disk the
 system boots from: sdb or sdc?

Neither.  It is booting from sda.  And your fstab unambiguously states
that your system will mount the specified UUIDs.  If you need help in
tracking down which UUID maps to which disk see the output of the
blkid program.

 The next thing is: If sdb, where is the boot sector? in the master
 boot sector (outside of the partions of the disk) or in the volume
 boot sector (inside the first partition of the disk)? If the later I
 must not reformat the disk.

It isn't booting from sdb or sdc or sdz.  (Hopefully you did not chain
them into the boot process.)  You can verify this by unplugging sdb
and sdc from your system and booting it without them.

 The third question is: How can I move the boot sectors?
 I would like to move the boot sector to sda

You don't move the MBR.  You install the MBR.

  # grub-install /dev/sda

But I am sure that is already the case since that is the default.

 and remove boot labels from sdb and sdc.

Use a partition editor such as gparted, sfdisk, cfdisk, fdisk or other
to change labels and bootable flags.

 But sdc also hosts Windoze 7?  Is that a problem.

Of course!  MS-Windows is always a problem.  :-)

 So, I should change grub, fstab, and what else?  And how?

You have asked very many questions based upon incorrect assumptions!
Because of this 

Re: disk labels mismatch

2013-01-15 Thread pavicic

Hi

 Date: Mon, 14 Jan 2013 19:43:50 -0800
 Subject: Re: disk labels mismatch
 I'd suggest that you gather usage information for your various
 partitions/ directories, back up everything, wipe the disks, and start
 over.

I thought I came to a Linux forum where people 
solve problems not scrap them. The latter sounds like
from a Windoze forum. 

Some more details. sdb is not mounted but I can easily 
mount it. Then I'll have two / two /home etc. This is 
because sdb is from an old system. The problem is that
I'm afraid to reformat sdb because it has a bootable 
label and sdc as well. So, the first thing I would like
to find out is which disk the system boots from: sdb 
or sdc? The next thing is: If sdb, where is the boot 
sector? in the master boot sector (outside of the 
partions of the disk) or in the volume boot sector 
(inside the first partition of the disk)? If the 
later I must not reformat the disk. The third question 
is: How can I move the boot sectors? I would like to 
move the boot sector to sda and remove boot labels 
from sdb and sdc. But sdc also hosts Windoze 7? Is 
that a problem. So, I should change grub, fstab, and 
what else? And how? 

Mladen. 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130115120651.ga4...@grad.hr



Re: disk labels mismatch

2013-01-15 Thread David Christensen

On 01/15/13 04:06, pavicic wrote:

I thought I came to a Linux forum where people
solve problems not scrap them. The latter sounds like
from a Windoze forum.


I have a SOHO network with my primary desktop/ VirtualBox server, two 
desktops, one backup server, and a Windows XP laptop.  I used to do paid 
work at home, but not right now.



I've found that it's better/ faster/ cheaper to backup/ wipe/ rebuild 
machines than to try to trouble-shoot them.  This forces me to have 
robust backup procedures in place, and reinforces my system 
installation/ configuration and data restoration skills.



As I once heard a speaker say at a LUG meeting:

You should be able to throw any machine out a nine story window
and have a replacement in operation within half a day.


That said, successfully trouble-shooting a mess you created would help 
you understand what you did wrong, and deepen your knowledge of that 
part of the system.  I've done plenty of trouble-shooting over the 
years.  The problem is that I can't estimate it, or guarantee success. 
I can for backup/ wipe/ rebuild.



So, I guess it depends on your goals.  Mine are 1) reliable operations 
and 2) disaster preparedness.  What are yours?



David


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

Archive: http://lists.debian.org/50f62b52.2070...@holgerdanske.com



disk labels mismatch

2013-01-14 Thread pavicic

Hi!

I've added a new disk in a hurry and now I have several mismatches.
Would anyone care to help me to sort them out. Below I'm giving fstab,
fdisk -l, df -la (apparently / (root) is duplicated ??, etc.). I also
enclose relevant sections from /var/log/system and grub. Each section 
starts with ***

The system works without apparent problems but I do not have a clear
correspondence between disks sda, sdb. sdc and directories / , /run/,
etc. I would like to establish correspondence (and, e.g., have only sda,
sdb, and sdc in fstab, and have only one /) so as to be able to
optimally use the space on the disks and avoid possible duplication of
system files. For instance, does the appearance of two / mean that
systems files are written on both sda and sdb? If so, how can sort that
out.

*** fstab:

proc /proc proc defaults 0 0
/ was on /dev/sda1 during installation

UUID=2b4e1ed6-4b09-4c42-a958-9493cffa7f58 / ext3 errors=remount-ro 0 1
/home was on /dev/sda3 during installation

UUID=a3cb2cbb-d6db-46e1-a0e7-73f264d255a1 /home ext3 defaults 0 2
swap was on /dev/sda2 during installation

UUID=25c7fb6d-47a4-4594-9cfd-20e9680f5e0b none swap sw 0 0 /dev/scd0
/media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/sdc3 /windoze vfat
rw,user,noauto 0 0 /dev/sdc4 /mutant ext3 defaults,errors=remount-ro 0 1
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

*** fdisk -l

Disk /dev/sdb: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track,
14593 cylinders, total 234441648 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 identifier: 0x000b1cf4

Device Boot Start End Blocks Id System /dev/sdb1 * 2048 78125055
39061504 83 Linux /dev/sdb2 78125056 203124735 62499840 83 Linux
/dev/sdb3 203124736 234440703 15657984 82 Linux swap / Solaris

Disk /dev/sdc: 240.1 GB, 240057409536 bytes 255 heads, 63 sectors/track,
29185 cylinders, total 468862128 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 identifier: 0xc4c22279

Device Boot Start End Blocks Id System /dev/sdc1 * 2048 206847 102400 7
HPFS/NTFS/exFAT /dev/sdc2 206848 247676927 123735040 7 HPFS/NTFS/exFAT
/dev/sdc3 247676928 36000 56161536+ b W95 FAT32 /dev/sdc4 36001
468862127 54431063+ 83 Linux

Disk /dev/sda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track,
14593 cylinders, total 234441648 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 identifier: 0x49382feb

Device Boot Start End Blocks Id System /dev/sda1 2048 78125055 39061504
83 Linux /dev/sda2 78125056 203192319 62533632 83 Linux /dev/sda3
203192320 234440703 15624192 82 Linux swap / Solaris

*** df -la

Filesystem 1K-blocks Used Available Use% Mounted on rootfs 38445384
7493556 28998756 21% / sysfs 0 0 0 - /sys proc 0 0 0 - /proc udev 10240
0 10240 0% /dev devpts 0 0 0 - /dev/pts tmpfs 1645524 896 1644628 1%
/run /dev/sda1 38445384 7493556 28998756 21% / tmpfs 5120 0 5120 0%
/run/lock tmpfs 6415880 0 6415880 0% /run/shm fusectl 0 0 0 -
/sys/fs/fuse/connections /dev/sda2 61550604 4113240 54310684 8% /home
/dev/sdc4 53575504 32089000 18764952 64% /mutant rpc_pipefs 0 0 0 -
/var/lib/nfs/rpc_pipefs

*** /var/log/system

Jan 14 14:44:46 BlenderMonster kernel: [ 2.602349] scsi 0:0:0:0:
Direct-Access ATA OCZ-AGILITY3 2.06 PQ: 0 ANSI: 5 

Jan 14 14:44:46 BlenderMonster kernel: [ 2.605979] scsi 1:0:0:0: 
Direct-Access ATA KINGSTON SH100S3 320A PQ: 0ANSI: 5 

Jan 14 14:44:46 BlenderMonster kernel: [ 2.606285] scsi 1:0:1:0:
Direct-Access ATA ADATA SSD S599 2 3.4. PQ: 0 ANSI:

Jan 14 14:44:46 BlenderMonster kernel: [ 2.421387] ata2.00: 
ATA-8: KINGSTON SH100S3120G, 320ABBF0, max UDMA/133 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.421392] ata2.00: 
234441648 sectors, multi 16:LBA48 NCQ (depth 0/32) 
Jan 14 14:44:46 BlenderMonster kernel: [2.421400] ata2.01: 
ATA-8: ADATA SSD S599 256GB, 3.4.6, max UDMA/133 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.421403] ata2.01: 
468862128 sectors, multi 16: LBA48 NCQ (depth 0/32) 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.428910] ata1.00: 
ATA-9: OCZ-AGILITY3, 2.06, max UDMA/133 Jan 14 14:44:46 
BlenderMonster kernel: [ 2.428912] ata1.00: 234441648
sectors, multi 16: LBA48 NCQ (depth 0/32)

Jan 14 14:44:46 BlenderMonster kernel: [ 2.608483] sd 0:0:0:0: [sda]
234441648 512-byte logical blocks: (120 GB/111 GiB) 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.608486] sd 1:0:0:0: [sdb] 
234441648 512-byte logical blocks: (120 GB/111 GiB) 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.608489] sd 1:0:1:0: [sdc] 
468862128 512-byte logical blocks: (240 GB/223 GiB) 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.608544] sd 1:0:0:0: [sdb] 
Write Protect is off 
Jan 14 14:44:46 BlenderMonster kernel: [ 2.608546] sd 1:0:0:0: [sdb] 
Mode Sense: 00 3a 00 00 
Jan 14 14:44:46 

Re: disk labels mismatch

2013-01-14 Thread David Christensen

On 01/14/13 07:18, pavicic wrote:

I've added a new disk in a hurry and now I have several mismatches.
Would anyone care to help me to sort them out.


I'd suggest that you gather usage information for your various 
partitions/ directories, back up everything, wipe the disks, and start over.



I typically put boot and root on one drive (system drive), and put data 
on another drive (or multiple drives assembled into one using LVM).



The faster the system drive, the better.  An SSD system drive is best.


HTH,

David


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

Archive: http://lists.debian.org/50f4d076.2030...@holgerdanske.com