Advertisement
inukaze

Inukaze - Dummy method to clean root partion

Nov 9th, 2011
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. Inukaze : This its my own , an easy method
  2. To clean a "/" (root) partition of linux filesystem
  3. except the "/home" directory / partition to install
  4. a new linux distro without troubles and clean installation
  5.  
  6. its simple , just config you BIOS or use "BootMenu"
  7. in somes PCS activate when you press "F8" at boot
  8. and select "CD-ROM"/"USB"/"SD" depend of case
  9.  
  10. Now start your "live"/CD/SD/USB and now use the
  11. "Terminal" with the command "sudo blkid" if a debian
  12. or debian derivate distro
  13.  
  14. with anothers distro you try with "su blkid" or first
  15. login how root , using "sudo su"
  16.  
  17. now , if you know what partition you need mount
  18. ( i ever make a "LABEL" for each partition i can )
  19. in a directory , for example you can make a folder
  20.  
  21. cd $HOME/Desktop
  22. sudo mkdir -p Distro
  23.  
  24. For example :
  25. sudo mount /dev/sda2 Distro
  26.  
  27. and now use :
  28. sudo rm -rf bin boot cdrom DebBoot dev etclib lib64 lost+found media mnt opt proc root run sbin selinux srv sys tmp usr var xfce4
  29.  
  30. and now
  31. cd ..
  32. sudo umount Distro
  33.  
  34. Now you can use the installer in your Live Distro , to install , without format the partition
  35.  
  36. if you are trying to install old version of "Ubuntu" for Example "Jaunty Jackalope"
  37. and in the end of installation "grub-install" fail , you must do the follow for example
  38.  
  39. # - Partitions "/dev/sda2" ( root partition ) , "/dev/sda4" ( Boot partition ) :
  40.  
  41. mkdir Linux
  42. sudo mount /dev/sda2 Linux/
  43. sudo mount /dev/sda4 Linux/boot/
  44. sudo mount --bind /proc Linux/proc
  45. sudo mount --bind /dev Linux/dev
  46. sudo mount --bind /sys Linux/sys
  47. sudo chroot Linux/
  48.  
  49. grub-install --recheck /dev/sda
  50. grub-update
  51.  
  52. Ready. ( if dont work , try with "grub-install --recheck /dev/sda4 && grub-update )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement