• pxe引导gparted live万能分区


    pxe 引导gparted live万能分区

    官方链接:
    http://gparted.sourceforge.net/index.php
    http://gparted.sourceforge.net/download.php
    http://gparted.sourceforge.net/livepxe.php

    参考文档:
    http://www.debian-administration.org/article/478/Setting_up_a_server_for_PXE_network_bootinghttp://drbl.sourceforge.net
    http://clonezilla.nchc.org.tw/clonezilla-live/livepxe.php
    http://clonezilla.nchc.org.tw/clonezilla-live/doc/fine-print.php?path=./99_Misc/00_live-initramfs-manual.doc#00_live-initramfs-manual.doc


    一. 简介:

    GParted is a free partition editor for graphically managing your disk partitions.

    With GParted you can resize, copy, and move partitions without data loss, enabling you to:

    • Grow or shrink your C: drive
    • Create space for new operating systems
    • Attempt data rescue from lost partitions
    GParted Main screen

    Discover More

    Features

    • Perform actions with partitions such as:
      • create or delete
      • resize or move
      • check
      • label
      • set new UUID
      • copy and paste
    • Manipulate file systems such as:
      • btrfs
      • ext2 / ext3 / ext4
      • fat16 / fat32
      • hfs / hfs+
      • linux-swap
      • lvm2 pv
      • nilfs2
      • ntfs
      • reiserfs / reiser4
      • ufs
      • xfs
      For specific actions supported see detailed features.

    Requirements

    GParted can be used on x86 and x86-64 based computers running Linux, Windows, or Mac OS X by booting from media containing GParted Live. A minimum of 160 MB of RAM is needed to use all of the features of the GParted application.

    Free Software

    GParted is free software.
    You have the freedom to run, copy, distribute, study, change, and improve GParted.
    You do not have to pay money to use GParted.
    GParted is distributed under the GNU General Public License version 2 or (at your option) any later version.



    二. 搭建PXE环境:

    gparted live cd是基于debian-live,所以,syslinux参数和红帽的有些区别,具体的可以参看文章开头的参考文档。

    有兴趣的朋友可以参考在下的拙篇,这里就不再细述,欢迎大家批评指正

    CenOS6 nginx+pxe+tftpd+samba/nfs+dhcpd 无盘安装windows & linux

    Ubuntu12.04 nginx+pxe+tftpd+samba/nfs+dhcpd 无盘安装windows & linux



    以下是gparted live官方的帮助文档。

    GParted Live on PXE Server

    Besides GParted Live CD and Live USB, we can put the GParted Live image on a PXE server so that a client can boot via the network to use GParted. The steps to do this are as follows:

    1. Set up a PXE server. You might refer to documentation, such as setting up a server for PXE network booting, or DRBL (Diskless Remote Boot in Linux) to assist you.
      In these steps we assume the pxelinux config file is /tftpboot/nbi_img/pxelinux.cfg/default, and the image files are in /tftpboot/nbi_img/.
    2. Set up an http service on the PXE server.
    3. Download GParted live zip file. You have to use 0.3.7-2 or later because network drivers are only included after that.
    4. Unzip all the files in a temp dir /tmp/gparted/. You can do this with a command such as:
          mkdir -p /tmp/gparted; unzip gparted-live-*.zip -d /tmp/gparted/
          
      
      NOTE: Replace gparted-live-*.zip with the file name you just downloaded.
    5. Copy the necessary boot files (vmlinuz and initrd.img) to /tftpboot/nbi_img/. For example:
          cp /tmp/gparted/live/{vmlinuz,initrd.img} /tftpboot/nbi_img/
          
      
    6. Copy /tmp/gparted/live/filesystem.squashfs to your http server. For example:
          cp /tmp/gparted/live/filesystem.squashfs /var/www/
          
      
    7. Edit your PXE config file /tftpboot/nbi_img/pxelinux.cfg/default, and append the following:
          label GParted Live  MENU LABEL GParted Live
                  kernel vmlinuz
                  append initrd=initrd.img boot=live config union=aufs noswap noprompt vga=788 fetch=http://$webserverIP/filesystem.squashfs
          
      
    8. NOTE1: Replace $webserverIP with the IP address of your http server.
      NOTE2: Remember to check the boot parameters in syslinux/syslinux.cfg from the zip file. You should replace the above listed parameters with these more recent ones because these newer boot parameters might be different. For example the vmlinuz path might be different.
      NOTE3: Do not use the parameter "ip=frommedia" in your PXE config file.

    For more information about pxelinux, refer to the following article on PXELinux.


    这里以GParted live 0.19.1-4为例:gparted-live-0.19.1-4-amd64.iso

    New in this release:

    • The underlying GNU/Linux operating system was upgraded. This release is based on the Debian Sid repository (as of 2014/Aug/29).

    • New GParted release 0.19.1.

    • Linux kernel was updated to 3.14.15-2.

    • Program MC_HxEd was removed from GParted live because it's not maintained anymore.

    • Program zenity instead of gdialog is used in gl-shutdown-menu.


    三. 定义gparted pxe菜单:

    mount -o loop /mnt/ISO/gparted-live-0.19.1-4-amd64.iso  /mnt/iso

    mkdir /var/lib/tftpboot/gparted

    cp -av /mnt/iso/live /var/lib/tftpboot/gparted

    cp -av /mnt/iso/live/filesystem.squashfs /var/www/pub/ftp/gparted

    cp -av /mnt/iso/syslinux/syslinux.cfg /var/lib/tftpboot/gparted/default

    以下是我个人的gparted pxe菜单/var/lib/tftpboot/gparted/default,把iso中的syslinux.cfg另存为default再加以修改即可,仅供参考。

    注:这里最重要的就是filesystem.squashfs这个文件,fetch支持tftp,ftp,http这几种模式,我这里选用的是http模式,所以看的到是fetch=http://192.168.8.254/ftp/gparted/filesystem.squashfs


    default /gparted/vesamenu.c32
    #prompt 1
    timeout 600

    display /gparted/boot.msg

    menu background /gparted/Gsplash.png
    menu title Gnome Partition Editor
    menu color border 0 #ffffffff #00000000
    menu color sel 7 #ffffffff #ff000000
    menu color title 0 #ffffffff #00000000
    menu color tabmsg 0 #ffffffff #00000000
    menu color unsel 0 #ffffffff #00000000
    menu color hotsel 0 #ff000000 #ffffffff
    menu color hotkey 7 #ffffffff #ff000000
    menu color scrollbar 0 #ffffffff #00000000

    # MENU MASTER PASSWD

    say **********************************************************************
    say GParted.
    say Gnome Partition Editor.
    say http://gparted.org
    say THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
    say **********************************************************************

    # Allow client to edit the parameters
    ALLOWOPTIONS 1

    # simple menu title
    MENU TITLE http://gparted.org

    # Since no network setting in the squashfs image, therefore if ip=, the network is disabled. That's what we want.
    label GParted Live (To RAM)
      MENU DEFAULT
      # MENU HIDE
      MENU LABEL GParted Live (To ^RAM. Boot media can be removed later)
      # MENU PASSWD
      kernel /gparted/live/vmlinuz
      append initrd=/gparted/live/initrd.img boot=live username=user config quiet noswap noeject  toram=filesystem.squashfs ip=  nosplash fetch=http://192.168.8.254/ftp/gparted/filesystem.squashfs

      TEXT HELP
      All the programs will be copied to RAM, so you can
      remove boot media (CD or USB flash drive) later
      ENDTEXT

    label GParted Live
      # MENU DEFAULT
      # MENU HIDE
      MENU LABEL GParted Live (^Default settings)
      # MENU PASSWD
      kernel /gparted/live/vmlinuz
      append initrd=/gparted/live/initrd.img boot=live username=user config quiet noswap noeject fetch=http://192.168.8.254/ftp/gparted/filesystem.squashfs
      TEXT HELP
      * Boot menu for BIOS machine
      * GParted live version: 0.19.1-4-amd64. Live version maintainer: Steven Shiau
      * Disclaimer: GParted live comes with ABSOLUTELY NO WARRANTY
      ENDTEXT

    MENU BEGIN ^Other modes of GParted Live
    label GParted Live KMS
      # MENU DEFAULT
      # MENU HIDE
      MENU LABEL GParted Live (Default settings, ^KMS)
      # MENU PASSWD
      kernel /gparted/live/vmlinuz
      append initrd=/gparted/live/initrd.img boot=live username=user config quiet noswap noeject vga=791 fetch=http://192.168.8.254/ftp/gparted/filesystem.squashfs
      TEXT HELP
      KMS mode. OK for ATI, Intel and NVIDIA VGA cards.
      ENDTEXT

    label GParted Live without framebuffer
      # MENU DEFAULT
      # MENU HIDE
      MENU LABEL GParted Live (^Safe graphic settings, vga=normal)
      # MENU PASSWD
      kernel /gparted/live/vmlinuz
      append initrd=/gparted/live/initrd.img boot=live username=user config quiet noswap noeject ip= nomodeset vga=normal nosplash fetch=http://192.168.8.254/ftp/gparted/filesystem.squashfs
      TEXT HELP
      Disable console frame buffer support
      ENDTEXT

    label GParted Live failsafe mode
      # MENU DEFAULT
      # MENU HIDE
      MENU LABEL GParted Live (^Failsafe mode)
      # MENU PASSWD
      kernel /gparted/live/vmlinuz
      append initrd=/gparted/live/initrd.img boot=live username=user config quiet noswap noeject acpi=off irqpoll noapic noapm nodma nomce nolapic nosmp ip= nomodeset vga=normal nosplash fetch=http://192.168.8.254/ftp/gparted/filesystem.squashfs
      TEXT HELP
      acpi=off irqpoll noapic noapm nodma nomce nolapic
      nosmp nomodeset vga=normal nosplash
      ENDTEXT

    MENU END
    label local
      # MENU DEFAULT
      # MENU HIDE
      MENU LABEL ^Local operating system in harddrive (if available)
      # MENU PASSWD
      # 2 method to boot local device:
      # (1) For localboot 0, it is decided by boot order in BIOS, so uncomment the follow 1 line if you want this method:
      # localboot 0

      # (2) For chain.c32, you can assign the boot device.
      # Ref: extlinux.doc from syslinux
      # Syntax: APPEND [hd|fd] []
      # [] is optional.
      # Ex:
      # Second partition (2) on the first hard disk (hd0);
      # Linux would *typically* call this /dev/hda2 or /dev/sda2, then it's "APPEND hd0 2"
      #
      kernel chain.c32
      append hd0
      TEXT HELP
      Boot local OS from first hard disk if it's available
      ENDTEXT


    # Note! *.bin is specially purpose for syslinux,
    # Do NOT use memtest.bin, use memtest instead of memtest.bin
    label memtest
      # MENU DEFAULT
      # MENU HIDE
      MENU LABEL Memory test using ^Memtest86+
      # MENU PASSWD
      kernel /gparted/live/memtest
      TEXT HELP
      Run memory test using Memtest86+
      ENDTEXT



    四. 效果图:

    pxe引导gparted <wbr>live万能分区

    pxe引导gparted <wbr>live万能分区

    pxe引导gparted <wbr>live万能分区
    键盘映射,一般标准的美式键盘直接选择  

    pxe引导gparted <wbr>live万能分区
    系统语言,很遗憾目前还没有中文支持,中国的开源自由事业还有很长的路要走。默认 [33]  美式英语

    pxe引导gparted <wbr>live万能分区
    模式选择,默认是 [0] X 环境,可选的[1] 自定义 X  ;  [2] 命令行模式


    pxe引导gparted <wbr>live万能分区

  • 相关阅读:
    ASCII 说明
    用GDB调试程序
    手把手教你使用Matplotlib绘图|实战
    什么!Python还能帮你找老婆?
    词云图的几种制作方法评测,你pick哪款
    我常用的10个Python实用小Trick
    爬虫代码详解Python多线程、多进程、协程
    [转载] tomcat集群基于redis共享session解决方案
    集群/分布式环境下5种session处理策略
    java7特性之 try-with-resources
  • 原文地址:https://www.cnblogs.com/lixuebin/p/10814500.html
Copyright © 2020-2023  润新知