Announcement

Collapse
No announcement yet.

Moving /boot files to another location.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Moving /boot files to another location.

    I have /boot on /dev/sda1 and / on /dev/sda2.
    This means all files in /boot are physically in the root of /dev/sda1.
    Is possible to change their location to /MultiBoot/Boot of /dev/sda1 (/dev/sda1/MutiBoot/Boot) ??

    Because /dev/sda1 I use also for other purposes, it is a mess with linux files in its root. If I can place all of them to subfolder, I will be happy!!
    Last edited by iX; Feb 01, 2012, 09:38 AM. Reason: Solved.

    #2
    Figured out solution for /boot moving!!

    1.) I moved the content of /boot to directory MultiBoot/Boot placed on disk /dev/sda1.

    2.) From /etc/fstab I deleted:

    # /dev/sda1
    UUID=5A51-6BCB /boot vfat rw 0 0
    And instead of it I placed there:

    # /dev/sda1
    UUID=5A51-6BCB /media/B vfat rw 0 0
    3.) To file /etc/rc.local I put:

    # /dev/sda1
    mount --bind /media/B/MultiBoot/Boot /boot
    4.) I run sudo grub-install --boot-directory=/MultiBoot/Boot /dev/sda for fixing of GRUB2 loader.

    5.) Also run sudo update-grub and sudo update-initramfs -u.

    ... And Voalaaaa!!

    Now I have in /media/B mounted whole boot partition for other purposes, and no mess of linux boot files - they are moved into a single directory, just I wanted.
    And what about its best magic? System see /boot directory with files placed there, where originally were!
    No more modifications required - commands such as sudo update-initramfs -u or sudo update-grub works normally, simply alles gute!!

    8)

    Comment

    Working...
    X