Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Changement de disque et donc de partition root

1 réponse
Avatar
Matthieu
Bonjour,

Je veux migrer toute ma partition root sur un autre disque.
Après partitionnement et formatage, j'ai donc monté le second disque et
y est copié tous les fichiers de mon ancienne partition grace à des "cp
-a" de tous mes repertoires mis à part /proc, comme indiqué sur divers
howto.

Après ça j'ai modifié les fichiers fstab et lilo.conf puis exécuter
"lilo" pour prendre en compte ces modifications. Je reboot. ça marche,
mais le résultat après reboot est ... décevant : ma nouvelle partition
est bien montée en /, tout semble fonctionner, mais lorsque je fais un
df, voila ce que j'obtiens :

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md0 2605408 930780 1542280 38% /
/dev/hdc3 2605408 930780 1542280 38% /mnt


Ma nouvelle partition (160 Go normalement) fait exactement la même
taille que ma partition root initiale (2.5 Go)...

Voila mes fichiers de config avant migration :

defi2:~# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdc3 2605408 930660 1542400 38% /
/dev/md0 172839048 930660 171908388 0.6% /mnt


defi2:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hdc3 / ext2 errors=remount-ro 0 1
/dev/hdg1 none swap sw 0 0
/dev/hde1 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0


defi2:~# cat /etc/lilo.conf
lba32
disk=/dev/hdc
bios=0x80
boot=/dev/hdc
root=/dev/hdc3
install=/boot/boot-menu.b
map=/boot/map
delay=20
vga=normal
default=Linux
image=/vmlinuz
label=Linux
read-only
image=/vmlinuz.old
label=LinuxOLD
read-only
optional

defi2:~# cat /etc/fstab.raid
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md0 / ext3 errors=remount-ro 0 1
/dev/hdg1 none swap sw 0 0
/dev/hde1 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0


defi2:~# cat /etc/lilo.conf.raid
lba32
disk=/dev/md0
bios=0x80
boot=/dev/hde
root=/dev/md0
install=/boot/boot-menu.b
map=/boot/map
delay=20
vga=normal
default=Linux
image=/vmlinuz
label=Linux
read-only
image=/vmlinuz.old
label=LinuxOLD
read-only
optional


#MODIF POUR BOOT SUR md0
defi2:/etc# mv lilo.conf lilo.conf.hdc
defi2:/etc# mv lilo.conf.raid lilo.conf
defi2:/etc# mount /dev/md0 /mnt
defi2:/etc# cp lilo.conf /mnt/etc/lilo.conf
defi2:/etc# cp fstab /mnt/etc/fstab
defi2:/etc# cp lilo.conf.hdc /mnt/etc
defi2:/etc# cp fstab.hdc /mnt/etc
defi2:/etc# lilo
defi2:/etc# reboot

WTF ?

1 réponse

Avatar
Matthieu
Arrêtez tout : le pb est corrigé...
Faut copier /boot après l'éxécution de lilo...
ThX quand même :)

Bonjour,

Je veux migrer toute ma partition root sur un autre disque.
Après partitionnement et formatage, j'ai donc monté le second disque et
y est copié tous les fichiers de mon ancienne partition grace à des "cp
-a" de tous mes repertoires mis à part /proc, comme indiqué sur divers
howto.

Après ça j'ai modifié les fichiers fstab et lilo.conf puis exécuter
"lilo" pour prendre en compte ces modifications. Je reboot. ça marche,
mais le résultat après reboot est ... décevant : ma nouvelle partition
est bien montée en /, tout semble fonctionner, mais lorsque je fais un
df, voila ce que j'obtiens :

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/md0 2605408 930780 1542280 38% /
/dev/hdc3 2605408 930780 1542280 38% /mnt


Ma nouvelle partition (160 Go normalement) fait exactement la même
taille que ma partition root initiale (2.5 Go)...

Voila mes fichiers de config avant migration :

defi2:~# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdc3 2605408 930660 1542400 38% /
/dev/md0 172839048 930660 171908388 0.6% /mnt


defi2:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hdc3 / ext2 errors=remount-ro 0 1
/dev/hdg1 none swap sw 0 0
/dev/hde1 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0


defi2:~# cat /etc/lilo.conf
lba32
disk=/dev/hdc
bios=0x80
boot=/dev/hdc
root=/dev/hdc3
install=/boot/boot-menu.b
map=/boot/map
delay
vga=normal
default=Linux
image=/vmlinuz
label=Linux
read-only
image=/vmlinuz.old
label=LinuxOLD
read-only
optional

defi2:~# cat /etc/fstab.raid
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md0 / ext3 errors=remount-ro 0 1
/dev/hdg1 none swap sw 0 0
/dev/hde1 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0


defi2:~# cat /etc/lilo.conf.raid
lba32
disk=/dev/md0
bios=0x80
boot=/dev/hde
root=/dev/md0
install=/boot/boot-menu.b
map=/boot/map
delay
vga=normal
default=Linux
image=/vmlinuz
label=Linux
read-only
image=/vmlinuz.old
label=LinuxOLD
read-only
optional


#MODIF POUR BOOT SUR md0
defi2:/etc# mv lilo.conf lilo.conf.hdc
defi2:/etc# mv lilo.conf.raid lilo.conf
defi2:/etc# mount /dev/md0 /mnt
defi2:/etc# cp lilo.conf /mnt/etc/lilo.conf
defi2:/etc# cp fstab /mnt/etc/fstab
defi2:/etc# cp lilo.conf.hdc /mnt/etc
defi2:/etc# cp fstab.hdc /mnt/etc
defi2:/etc# lilo
defi2:/etc# reboot

WTF ?