Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 19/08/2016, à 11:03

xunil2003

Déplacer un partiton sur la racine après installation

Bonjour,

J'ai installé kubuntu 14.04 LTS.
J'ai créé une partition de 3 Go pour /var/www mais je me suis trompé à l'installation et je l'ai déclaré en /var
Donc je voudrais déplacer les fichiers /var dans la racine et déclarer la partition /var en /var/www

Comment puis-je faire ?
Merci.


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne

#2 Le 19/08/2016, à 11:12

pingouinux

Re : Déplacer un partiton sur la racine après installation

Bonjour,
Tu peux déjà donner le retour de ces commandes :

cat /etc/fstab
df
ls -l /var

Hors ligne

#3 Le 19/08/2016, à 11:36

xunil2003

Re : Déplacer un partiton sur la racine après installation

Bjr,

Voici le retour

xxx@xxx-amd:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=9b66bc21-f4ac-40df-9ad2-18a5f460885b /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda5 during installation
UUID=2ee7eda4-02da-4b9d-8a9e-8b0cb110ecc0 /home           ext4    defaults        0       2
# /var was on /dev/sda6 during installation
UUID=a0f9cccf-a151-4feb-88ae-1c76c6e2b197 /var            ext4    defaults        0       2
# swap was on /dev/sda7 during installation
UUID=72cc1f4e-3f1e-45f8-9a32-93d1deddce7d none            swap    sw              0       0
xxx@xxx-amd:~$ 
xxx@xxx-amd:~$ df
Sys. de fichiers blocs de 1K  Utilisé Disponible Uti% Monté sur
udev                 1836052        8    1836044   1% /dev
tmpfs                 377100     1752     375348   1% /run
/dev/sda1          236335864  7679964  216627692   4% /
none                       4        0          4   0% /sys/fs/cgroup
none                    5120        0       5120   0% /run/lock
none                 1885492      144    1885348   1% /run/shm
none                  102400       20     102380   1% /run/user
/dev/sda6            4673664  2914956    1498256  67% /var
/dev/sda5          231528480   626256  219118188   1% /home
/dev/sdb1           30250000 29724032     525968  99% /media/cercle/CORSAIR
xxx@xxx-amd:~$ 
xxx@xxx-amd:~$ ls -l /var
total 68
drwxr-xr-x  2 root root      4096 août  19 10:25 backups
drwxr-xr-x 23 root root      4096 août  16 19:50 cache
drwxrwsrwt  2 root whoopsie  4096 févr. 18  2016 crash
drwxr-xr-x  2 root root      4096 août  16 19:41 games
drwxr-xr-x 83 root root      4096 août  16 19:57 lib
drwxrwsr-x  2 root staff     4096 avril 11  2014 local
lrwxrwxrwx  1 root root         9 juil. 23 11:08 lock -> /run/lock
drwxrwxr-x 19 root syslog    4096 août  19 10:25 log
drwx------  2 root root     16384 juil. 23 11:00 lost+found
drwxrwsr-x  2 root mail      4096 févr. 18  2016 mail
drwxrwsrwt  2 root whoopsie  4096 févr. 18  2016 metrics
drwxr-xr-x  2 root root      4096 févr. 18  2016 opt
lrwxrwxrwx  1 root root         4 juil. 23 11:08 run -> /run
drwxr-xr-x 11 root root      4096 août  16 19:31 spool
drwxrwxrwt  6 root root      4096 août  19 11:06 tmp
drwxr-xr-x  3 root root      4096 août  16 18:41 www
xxx@xxx-amd:~$ 

Merci.


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne

#4 Le 19/08/2016, à 12:35

pingouinux

Re : Déplacer un partiton sur la racine après installation

Bon ! Alors le plus simple serait de réinstaller. Il est possible de remettre les choses en état, mais le problème est que tu n'as pas accès en même temps au répertoire /var du système, et au point de montage de /dev/sda6.

Je suppose (à confirmer par un spécialiste) que le système ne peut pas continuer à tourner si on démonte le répertoire /var en cours de route. Il faudrait alors démarrer en Live pour faire ces manips hasardeuses.

Hors ligne