[Linux-bruxelles] Re: GParted & réorg disque - mkinitrd

Didier Misson dmlinux at belcenter.com
Jeu 14 Sep 20:32:57 CEST 2006


Gildas Cotomale a écrit :
> Le 13/09/06, Didier MISSON<didier.misson at total.com> a écrit :
>>
>> maintenant, les partitions ont les bonnes tailles.
>>
>> mais, leurs numéros ont changés !
>>
> Ceci est tout a fait normal et logique.
> Le plus de Linux est que ce que tu apperçois est à l'image de ce que
> contient ta table des parttions (qui lui voit bien la partion primaire
> -hdb1- puis la partition etendue -hdb2- qui contient une 1ere partoche
> logique -hdb5- une suivante -hdb5- ainsi de suite).
> Je ne vois franchement pas pourquoi il devrait s'amuser à faire des
> numérotations à trou qui ne correspondent à rien...
déjà pour ne pas foutre en l'air tout le reste de la config !

>
> [...]
>
>> ah.... le /etc/mtab !!!!
>> Celui là, je ne le connais pas bien... à quoi il sert exactement ?
>>
> Ben en fait, fstab est un fichier de config où tu défini tes
> préférences et les paramètres par défaut... Et n'oublions pas que tout
> n'est pas obligatoirement monté (options "auto" ou "noauto") ni par
> tout le monde...
oui, ça ok

> C'est grâce à lui que tu peux directement et simplement faire "mount
> /dev/periph" ou "mount /quel/repertoire" et mount s'en sort. :) En
> gros, tu t'évite de retaper de longues lignes de commande. Et pour le
> demarrage ça automatise pas mal.
oui   ;-)

>
> Par contre, /etc/mtab contient les montages courants (à l'opposé de
> fstab qui contient tout ce que tu as configuré et donc qu'on sait
> faire par défaut...) Tu peux bien monter un disque qui n'est pas dans
> ton fstab : en regardant, tu verras que mtab est mis a jour en
> consequence ; et quand tu demonte, c'est pareil... Mais bon, je ne
> vais pas rentrer dans les détails technique =)
>
> [...]
>
>> Franchement très long et pénible tout ça !
>>
> Tout à fait d'accord. Il faut toujours une certaine préparation avant
> de jouer avec les partitions ;D
oui admettons
et tu aurais préparé quoi dans ce cas ci pour éviter ces problèmes ?


>
>> Désolé, mais je pense que je n'aurais pas eu ces problèmes avec 
>> Partition
>> Magic :-(
>
> Par contre, pas d'accord. Et j'ai été plusieurs fois forcé d'utiliser
> PM pour arriver à des catastrophes pires que ça (même pour de la
> simple FAT agrandi sur une zone où il n'y avait rien et on a été bon
> pour des opérations de "récupération de données" !!)
je n'ai jamais eu de problèmes avec Partition Magic sur des partitions FAT
je reconnais que je n'ai pas essayé ce genre de manip avec PM sur des 
EXT2 ou 3.

> Je rigole si tu me soutiens que avec PM tu aurais eu après hdb7 tes
> hdb9 et hdb10... Maintenant, si le coeur t'en dit, il n'y a qu'à
> recommencer avec PM pour apprécier (on le voit déjà sous Wind0$ avec
> les lettres de lecteur qui changent et tout)
possible... tu as peut-être raison
>
>> GParted est très beau, simple... mais il y a encore de gros progrès à
>> faire !
>>
> Par contre, j'ai fait mumuse avec QtParted (qui n'est pas vraiment
> différent en apparence) hier et j'ai joué avec GParted ce week-end :
> no problem...
> Aller, on va dire que j'ai du pôt ? :/
quelle différence entre QTParted et GParted ?
à part le look ?
un fonctionne mieux que l'autre ?

N'empèche que :
- le fait que GParted m'ai donné autant de message d'erreur
- qu'il ne puisse pas augmenter la taille d'une partition EXT vers 
l'avant...

qd mm génant.

---------------------------------------------

la table des partitions avant que je ne la trie dans fdisk :

Disque /dev/hdb: 60.0 Go, 60040544256 octets
255 têtes, 63 secteurs/piste, 7299 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets

Périphérique Amorce    Début         Fin      Blocs    Id  Systême
/dev/hdb1              97        7299    57858097+   f  W95 Etendu (LBA)
/dev/hdb2               1          96      771088+  82  Linux swap / Solaris   <---- hors séquence
/dev/hdb5              97         880     6297448+   c  W95 FAT32 (LBA)
/dev/hdb6             881        1664     6297448+   c  W95 FAT32 (LBA)
/dev/hdb7            1665        2448     6297448+   c  W95 FAT32 (LBA)
/dev/hdb8            4011        4739     5855661   83  Linux
/dev/hdb9            4740        7299    20563168+  83  Linux
/dev/hdb10           2449        3178     5863693+  83  Linux   <---- hors séquence



Les entrées de la table de partitions ne sont pas dans l'ordre du disque



--------------------------------------------

quelques infos supplémentaires sur la façon dont nous nous en sommes sorti :

Pour sortir du Kernel Panic du au fait que le kernel essayait un résume 
sur une partition qui n'était pas la Swap : ajouter le paramètre resume=hdb1
Je l'avais ajouté dans /boot/grub/menu.lst :


title           Ubuntu, kernel 2.6.15-26-k7 resume=hdb1
root            (hd1,7)
kernel          /boot/vmlinuz-2.6.15-26-k7 root=/dev/hdb8 ro quiet splash resume=hdb1
initrd          /boot/initrd.img-2.6.15-26-k7
savedefault
boot

title           Ubuntu, kernel 2.6.15-26-k7 (recovery mode) resume=hdb1
root            (hd1,7)
kernel          /boot/vmlinuz-2.6.15-26-k7 root=/dev/hdb8 ro single resume=hdb1
initrd          /boot/initrd.img-2.6.15-26-k7
boot

----------------------------------------------------------------

le threat où j'ai trouvé l'aide :

http://www.ubuntuforums.org/archive/index.php/t-27371.html



tschaboo
October 9th, 2005, 04:50 PM
I wanted to re-activate this thread again, because exactly the same happened to me today. But I could work out the problem myself, below the protocol of what happened/what I did. Hope it might be helpful for someone else.

--------------------------------------------------------------------------

Before all that happened I copied my ubuntu to another disk. Earlier the /boot was on hdb1 (now hda1) and the "/" on hdb3 (now hda7). Swap was hdb2 now hda3.

I worked with this setup for a few days until I threw out hdb and put the old hda (windows) in that place. When I tried to start up the system I got
Starting Ubuntu ...
Kernel panic - not syncing: I/O error reading memory image

I tried to boot up in recovery mode to get more information and the Kernel panic occured after those lines:
Freeing memory ... done (463 pages freed)
attempt to access beyond end of device
hdb2: vw=16, want=8, limit=2
I messed around with the cables and master/slave-jumpers on my drives for an hour and the result was that linux came up fine, if the old hdb was in it's place or if there was no hdb at all. If the "new" hdb was there, I got this error. BTW: windows (now on hda1) started up fine and could also acces the FAT32-partitions on the "new" hdb.

Since I didn't find anything useful on google I installed the kernel-sources and did a find/grep on the string, just to get an idea what the kernel wants and the error message is in the file "kernel/power/swsusp.c" which has something todo with "machine suspend".

Now "memory image" makes sense and I guess that this is written into the swap partition and that could be the reason why the kernel (or whoever) tries to acces hdb2 (which was my swap partition earlier?!?!?) :???:

Then I searched for "hdb2" on my harddisk and found it in /etc/mkinitrd/mkinitrd.conf:
RESUME=/dev/hdb2
which i changed to /dev/hda5 now. Then i entered
mkinitrd -o /boot/initrd.img-2.6.10-5-k7
(found in some ubuntuforums-thread) and - YES! it's working.
tschaboo
October 9th, 2005, 05:45 PM
You can still b
http://www.ubuntuforums.org/archive/index.php/t-27371.html



tschaboo
October 9th, 2005, 04:50 PM
I wanted to re-activate this thread again, because exactly the same happened to me today. But I could work out the problem myself, below the protocol of what happened/what I did. Hope it might be helpful for someone else.

--------------------------------------------------------------------------

Before all that happened I copied my ubuntu to another disk. Earlier the /boot was on hdb1 (now hda1) and the "/" on hdb3 (now hda7). Swap was hdb2 now hda3.

I worked with this setup for a few days until I threw out hdb and put the old hda (windows) in that place. When I tried to start up the system I got
Starting Ubuntu ...
Kernel panic - not syncing: I/O error reading memory image

I tried to boot up in recovery mode to get more information and the Kernel panic occured after those lines:
Freeing memory ... done (463 pages freed)
attempt to access beyond end of device
hdb2: vw=16, want=8, limit=2
I messed around with the cables and master/slave-jumpers on my drives for an hour and the result was that linux came up fine, if the old hdb was in it's place or if there was no hdb at all. If the "new" hdb was there, I got this error. BTW: windows (now on hda1) started up fine and could also acces the FAT32-partitions on the "new" hdb.

Since I didn't find anything useful on google I installed the kernel-sources and did a find/grep on the string, just to get an idea what the kernel wants and the error message is in the file "kernel/power/swsusp.c" which has something todo with "machine suspend".

Now "memory image" makes sense and I guess that this is written into the swap partition and that could be the reason why the kernel (or whoever) tries to acces hdb2 (which was my swap partition earlier?!?!?) :???:

Then I searched for "hdb2" on my harddisk and found it in /etc/mkinitrd/mkinitrd.conf:
RESUME=/dev/hdb2
which i changed to /dev/hda5 now. Then i entered


mkinitrd -o /boot/initrd.img-2.6.10-5-k7


(found in some ubuntuforums-thread) and - YES! it's working.
tschaboo
October 9th, 2005, 05:45 PM
You can still boot your system if you pass the parameter "resume=hdxx" to the kernel (hdxx is your swap-partition) which overrides the setting in initrd. That way You don't need a live-cd. It should be even sufficient to put the parameter into grub.conf and not to build a new initrd at all. But I did not test that.





oot your system if you pass the parameter "resume=hdxx" to the kernel (hdxx is your swap-partition) which overrides the setting in initrd. That way You don't need a live-cd. It should be even sufficient to put the parameter into grub.conf and not to build a new initrd at all. But I did not test that.


-------------------------------------------------------

La commande pour remettre la bonne config pour le résume de la swap :

sudo mkinitrd -o initrd.img-2.6.15-26-k7


-- 
Didier Misson

Google Talk : didier.misson at gmail.com
Jabber: didier.misson at amessage.be
http://www.misson.net
http://www.nitro-modelisme.be
http://courshtml.mine.nu 





Plus d'informations sur la liste de diffusion Linux-bruxelles