お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#201 2009-12-08 16:58:51

jackalope
メンバ
登録日: 2009-01-01

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさん による投稿:

hitoさんから、
https://forums.ubuntulinux.jp/viewtopic … 172#p44172
の指摘を受けました。

#12hitoさん投降の内容は、30_os-proberのアクセス権を変更して目的を達成するのは想定された作法でなくUnix文化的でないので、/etc/default/grub.cfg (<-grubの間違い?)にGRUB_DISABLE_OS_PROBER=trueで対応するのが想定された作法ですなので、/etc/grub.d/以下のファイルすべてについて述べている訳ではないと思います。

kiyoshiさん による投稿:

「/etc/default/grubと/etc/grub.d/以下のファイルを自由に編集、ファイルの追加をしてもいい」のかどうかを分かってはいません。
いや、むしろ教えてくださったら幸いです。

私の考えは#188に書いたとおりです。

オフライン

 

#202 2009-12-08 22:04:10

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#203 2009-12-09 00:25:43

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさん こんばんは!
一件だけ ご報告しておきます。私にとっては とっても 残念な状況になりました。

このスレッドで kiyoshiさん以外のレベルの高いメンバーの方も
jackalopeさんには GRUBはとばしてGRUB2から勉強した方がいいですよ!
hir0さんから
GRUB2はUSB-HDDへのインストールには向いてないのでは?とお尋ねしたら
それは無いと思います。とお返事をいただき
kiyoshiさんには
別のところで・・おかしくなったら、自分で何とか直してやろう。ぐらいの気合は無い根性なしとも こっそり言われ

私は このUSBーHDDで GRUB2で絶対に 内蔵HDDが2つの環境の場合も 他のパソコンからも kiyoshiさんに 少しは質問をさせていたくとは思いますが、絶対に なぜ 今まで起動ができなかったのを 理解しながら 起動させてやろうという 闘志がむらむら わきあがってきたのです。

そこで 復習のため 原点にもどろうとし あの場面を再現すべく 起動に一度失敗し そこで 
 Eキーで編集して 例の3行を削除し root=(hd0,1)に変更し CTRL+Xで起動させようとしたのです。

そしたら なんの問題も無しに すんなり USB−UBUNTUが 起動してしまうのです。
一番下のUSB−HDDで起動してしまったので 一番上のエラーが出ていた 行を選択したも これまた 起動してしまうのです。他の2台のパソコンにつないで 起動を 一番上と一番下の行で 試みましたが 全て 何の 問題なく 起動してしまうのです。
 私は何度 こんな深夜にパソコンの前で 起動するたびに 大声で 叫んだことか!!「そんな〜!!!! アホな!!!!!なんでやねん!!!」
今までは 起動したら 喜んでいたのに  起動しないで あのエラーが出ること を何度祈った事か!!!

もう 訳が分かりません すみません 眠れないかもしれないけど もう寝ます。

オフライン

 

#204 2009-12-09 09:02:41

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

上記#203の

kaznon による投稿:

あの場面を再現すべく 起動に一度失敗し

は、ミスタイプです。 
あの起動に失敗した場面を再現すべく
に訂正して読んでください。
又日本語がうまくつかえてません。 すみません。

報告です。
ひとつ思い出したのですが、一昨日 アップデートマネージャーでアップデートを行ったのです。
その際に 一回 とまり 確か GRUBの今の 状態を保持し続けますか?というダイナログがでました。私は もちろん はい をクリックしました。
今の状態が変わってしまったら どのパソコンからも起動させる 目的が達成できないので・・・

でもこれが 原因の可能性大ですかね?? リリース後 一ヶ月でGRUB2の 不具合が 解消されるアップデートが含まれていたのですかね?
始めてインストール後に すぐアップデートを行えば 起動できたのかも?←この検証はまた 後日 時間がとれたらやってみます。

他の 検証をゆっくり ゆっくり 進めていきますので・・・分からない事がでてきたら よろしくお願いします。

オフライン

 

#205 2009-12-09 19:20:28

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#206 2009-12-09 20:08:49

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさん こんばんは! また 間違えてました 4行です。
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd1,1)
search --no-floppy --fs-uuid --set ba123456-7890-abcd-efghijklmnop
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=ba123456-7890-abcd-efghijklmnop ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic

(hd1,1)を(hd0,1)に訂正

の1から3行と
search --no-floppy --fs-uuid --set ba123456-7890-abcd-efghijklmnopの行です。

理解して 消せるようになれば 絶対に忘れないのですけど・・・・

今起動させたのですでど 昨日 起動したGRUB2一番上の行では 、途中で真っ暗になり 起動できませんでした。
一番下の USBーHDDの行で起動できたのです。 不可解な 事ばかりです。

質問です。4行消すのは まだ おそらく説明されても分からないと 思いますが・・・
(hd1,1)を(hd0,1)に訂正 は? どうして私のが(hd1,1)になってしまったのか?想像つきますか?

オフライン

 

#207 2009-12-09 20:24:32

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

結果です。 私には全然 分からないのです。 なぜか 10_linuxが 赤字です 注意! やばいのですか??

~$ grep -A10 10_linux /boot/grub/grub.cfg
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
        recordfail=1
#Deleted by Kaznon
    set quiet=1
    linux    /boot/vmlinuz-2.6.31-16-generic root=/dev/sdc1 ro   quiet splash
    initrd    /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
        recordfail=1
#Deleted by Kaznon
--
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

こんどは search --no-floppy が赤字です。


~$ grep -A5 "search --no-floppy" /usr/lib/grub/grub-mkconfig_lib
    echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
  fi

  if [ "x${loop_file}" != x ]; then
    loop_mountpoint="$(awk '"'${loop_file}'" ~ "^"$2 && $2 != "/" { print $2 }' /proc/mounts | tail -n1)"
    if [ "x${loop_mountpoint}" != x ]; then

オフライン

 

#208 2009-12-09 20:46:59

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

いま アップデートマネージャー で2日たっただけなのに 8つのアップデートがあり その中に grub-pc というのがありましたので アップデートして 内蔵HDDが2つのパソコンからでも 一番上のメニューで 起動ができました。
このgrub-pcというのが GRUB2の修正のアップデートなのですか??

オフライン

 

#209 2009-12-09 21:50:31

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#210 2009-12-09 22:06:50

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#211 2009-12-09 22:21:52

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさん
#208を ご覧ください。 今は 一番上の行で又、起動できたのです。

# Helper library for grub-mkconfig
# Copyright (C) 2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

transform="s,x,x,"

prefix=/usr
exec_prefix=${prefix}
datarootdir=${prefix}/share
datadir=${datarootdir}
sbindir=${exec_prefix}/sbin
pkgdatadir=${datadir}/`echo grub | sed "${transform}"`

grub_probe=${sbindir}/`echo grub-probe | sed ${transform}`

grub_warn ()
{
  echo "Warning: $@" >&2
}

make_system_path_relative_to_its_root ()
{
  path=$1
  # abort if file doesn't exist
  if test -e $path ; then : ;else
    return 1
  fi

  # canonicalize
  if path=`readlink -f $path` ; then : ; else
    return 1
  fi

  # if not a directory, climb up to the directory containing it
  if test -d $path ; then
    dir=$path
  else
    dir=`echo $path | sed -e "s,/[^/]*$,,g"`
  fi

  num=`stat -c %d $dir`

  # this loop sets $dir to the root directory of the filesystem we're inspecting
  while : ; do
    parent=`readlink -f $dir/..`
    if [ "x`stat -c %d $parent`" = "x$num" ] ; then : ; else
      # $parent is another filesystem; we found it.
      break
    fi
    if [ "x$dir" = "x/" ] ; then
      # / is our root.
      break
    fi
    dir=$parent
  done

  # This function never prints trailing slashes (so that its output can be
  # appended a slash unconditionally).  Each slash in $dir is considered a
  # preceding slash, and therefore the root directory is an empty string.
  if [ "$dir" = "/" ] ; then
    dir=""
  fi

  # XXX: This fails if $dir contains ','.
  path=`echo "$path" | sed -e "s,^$dir,,g"` || return 1

  case "`uname 2>/dev/null`" in
    CYGWIN*)
      # Cygwin: Check if regular or emulated mount.
      if [ -z "$dir" ] || [ "`stat -c %D "$dir/.."`" != 620000 ] ; then
        # Reached some mount point not below /cygdrive.
        # GRUB does not know Cygwin's emulated mounts,
        # convert to Win32 path and remove drive letter.
        path=`cygpath -m "$path" | sed -n 's,^[A-Za-z]:,,p'`
        test ! -z "$path" || return 1
      fi ;;
  esac

  echo "$path"
}

is_path_readable_by_grub ()
{
  path=$1

  # abort if path doesn't exist
  if test -e $path ; then : ;else
    return 1
  fi

  # abort if file is in a filesystem we can't read
  if ${grub_probe} -t fs $path > /dev/null 2>&1 ; then : ; else
    return 1
  fi

  return 0
}

convert_system_path_to_grub_path ()
{
  path=$1

  grub_warn "convert_system_path_to_grub_path() is deprecated.  Use prepare_grub_to_access_device() instead."

  # abort if GRUB can't access the path
  if is_path_readable_by_grub ${path} ; then : ; else
    return 1
  fi

  if drive=`${grub_probe} -t drive $path` ; then : ; else
    return 1
  fi

  if relative_path=`make_system_path_relative_to_its_root $path` ; then : ; else
    return 1
  fi

  echo ${drive}${relative_path}
}

save_default_entry ()
{
  if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then
    echo 'saved_entry=${chosen}'
    echo 'save_env saved_entry'
  fi
}

prepare_grub_to_access_device ()
{
  device=$1

  loop_file=
  case ${device} in
    /dev/loop/*|/dev/loop[0-9])
      loop_file=`losetup ${device} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
      case $loop_file in
        /dev/*) ;;
        *)
          loop_device=${device}
          device=`${grub_probe} --target=device "${loop_file}"`
        ;;
      esac
    ;;
  esac

  # Abstraction modules aren't auto-loaded.
  abstraction="`${grub_probe} --device ${device} --target=abstraction`"
  for module in ${abstraction} ; do
    echo "insmod ${module}"
  done

  fs="`${grub_probe} --device ${device} --target=fs`"
  for module in ${fs} ; do
    echo "insmod ${module}"
  done

  # If there's a filesystem UUID that GRUB is capable of identifying, use it;
  # otherwise set root as per value in device.map.
  echo "set root=`${grub_probe} --device ${device} --target=drive`"
  if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then
    echo "search --no-floppy --fs-uuid --set ${fs_uuid}"
  fi

  if [ "x${loop_file}" != x ]; then
    loop_mountpoint="$(awk '"'${loop_file}'" ~ "^"$2 && $2 != "/" { print $2 }' /proc/mounts | tail -n1)"
    if [ "x${loop_mountpoint}" != x ]; then
      echo "loopback loop0 ${loop_file#$loop_mountpoint}"
      echo "set root=(loop0)"
    fi
  fi
}

grub_file_is_not_garbage ()
{
  if test -f "$1" ; then
    case "$1" in
      *.dpkg-*) return 1 ;; # debian dpkg
    esac
  else
    return 1
  fi
  return 0
}

version_test_numeric ()
{
  local a=$1
  local cmp=$2
  local b=$3
  if [ "$a" = "$b" ] ; then
    case $cmp in
      ge|eq|le) return 0 ;;
      gt|lt) return 1 ;;
    esac
  fi
  if [ "$cmp" = "lt" ] ; then
    c=$a
    a=$b
    b=$c
  fi
  if (echo $a ; echo $b) | sort -n | head -n 1 | grep -qx $b ; then
    return 0
  else
    return 1
  fi
}

version_test_gt ()
{
  local a=`echo $1 | sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\)/~\1/g"`
  local b=`echo $2 | sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\)/~\1/g"`
  local cmp=gt
  if [ "x$b" = "x" ] ; then
    return 0
  fi
  case $a:$b in
    *.old:*.old) ;;
    *.old:*) a=`echo -n $a | sed -e s/\.old$//` ; cmp=gt ;;
    *:*.old) b=`echo -n $b | sed -e s/\.old$//` ; cmp=ge ;;
  esac
  dpkg --compare-versions "$a" $cmp "$b"
  return $?
}

version_find_latest ()
{
  local a=""
  for i in $@ ; do
    if version_test_gt "$i" "$a" ; then
      a="$i"
    fi
  done
  echo "$a"
}

オフライン

 

#212 2009-12-09 22:23:01

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

済みません 今日は早いですけど この位で 又 お返事いたします。

オフライン

 

#213 2009-12-09 22:53:55

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#214 2009-12-09 23:33:28

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさん による投稿:

ちょっとまずそうなことがあります。

気になります 結構 気に入って使っていたのですが・・・・この一言が気になって・・・解明して下さい!
報告してなかったですけど・・kiyoshiさん に進められて EXT3でフォーマットしてインストでしたが 最初のEXT4の時より 浮いた感じじゃなくて しっかり安定した感じなのです。

オフライン

 

#215 2009-12-09 23:35:27

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

結果です。
#! /bin/sh -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
    # We can't cope with devices loop-mounted from files here.
    case ${GRUB_DEVICE} in
      /dev/*) ;;
      *) exit 0 ;;
    esac
  ;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
    || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else#! /bin/sh -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
    # We can't cope with devices loop-mounted from files here.
    case ${GRUB_DEVICE} in
      /dev/*) ;;
      *) exit 0 ;;
    esac
  ;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
    || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

# add crashkernel option if we have the required tools
if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
    GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
fi

linux_entry ()
{
  cat << EOF
menuentry "$1" {
        recordfail=1
#Deleted by Kaznon
EOF
  if [ "x$3" = "xquiet" ]; then
    cat << EOF
    set quiet=1
EOF
  fi
  save_default_entry | sed -e "s/^/\t/"
  prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
  cat << EOF
    linux    ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2
EOF
  if test -n "${initrd}" ; then
    cat << EOF
    initrd    ${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}

list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`

while [ "x$list" != "x" ] ; do
  linux=`version_find_latest $list`
  echo "Found linux image: $linux" >&2
  basename=`basename $linux`
  dirname=`dirname $linux`
  rel_dirname=`make_system_path_relative_to_its_root $dirname`
  version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
  alt_version=`echo $version | sed -e "s,\.old$,,g"`
  linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

  initrd=
  for i in "initrd.img-${version}" "initrd-${version}.img" \
       "initrd-${version}" "initrd.img-${alt_version}" \
       "initrd-${alt_version}.img" "initrd-${alt_version}"; do
    if test -e "${dirname}/${i}" ; then
      initrd="$i"
      break
    fi
  done
  if test -n "${initrd}" ; then
    echo "Found initrd image: ${dirname}/${initrd}" >&2
  else
    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
    linux_root_device_thisversion=${GRUB_DEVICE}
  fi

  linux_entry "${OS}, Linux ${version}" \
      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
      quiet
  if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
    linux_entry "${OS}, Linux ${version} (recovery mode)" \
    "single ${GRUB_CMDLINE_LINUX}"
  fi

  list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

# add crashkernel option if we have the required tools
if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
    GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
fi

linux_entry ()
{
  cat << EOF
menuentry "$1" {
        recordfail=1
#Deleted by Kaznon
EOF
  if [ "x$3" = "xquiet" ]; then
    cat << EOF
    set quiet=1
EOF
  fi
  save_default_entry | sed -e "s/^/\t/"
  prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
  cat << EOF
    linux    ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2
EOF
  if test -n "${initrd}" ; then
    cat << EOF
    initrd    ${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}

list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`

while [ "x$list" != "x" ] ; do
  linux=`version_find_latest $list`
  echo "Found linux image: $linux" >&2
  basename=`basename $linux`
  dirname=`dirname $linux`
  rel_dirname=`make_system_path_relative_to_its_root $dirname`
  version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
  alt_version=`echo $version | sed -e "s,\.old$,,g"`
  linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

  initrd=
  for i in "initrd.img-${version}" "initrd-${version}.img" \
       "initrd-${version}" "initrd.img-${alt_version}" \
       "initrd-${alt_version}.img" "initrd-${alt_version}"; do
    if test -e "${dirname}/${i}" ; then
      initrd="$i"
      break
    fi
  done
  if test -n "${initrd}" ; then
    echo "Found initrd image: ${dirname}/${initrd}" >&2
  else
    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
    linux_root_device_thisversion=${GRUB_DEVICE}
  fi

  linux_entry "${OS}, Linux ${version}" \
      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
      quiet
  if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
    linux_entry "${OS}, Linux ${version} (recovery mode)" \
    "single ${GRUB_CMDLINE_LINUX}"
  fi

  list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

オフライン

 

#216 2009-12-10 00:27:15

hir0
メンバ
登録日: 2008-09-28

Re: USB-HDD 9.10 GURB GURB2

>all   #201,作法を説くには余りにも無作法な体であるかも知れない、文化も分からない。
#201だけの発言ではなくあちらこちらに時折書かれる言葉。

大きく大きく開かれたlinuxの門、雑誌、メディアを通して「Ubuntuへようこそ」。
お邪魔して一年、改めて思います、失礼の無いように文化や作法を見えないモンスター(私だけ?)では無く文書化されればと。

kazunonさん、良い方向の進展おめでとうございます。
理解されて何かが繋がれば、今までの作業が失敗も含めて全て貴重なノウハウになると思います。
よく分からないですが、きっと何かの小さな方向違い(考えの)を修正すればパーッと全て?がスッキリすると思いますよ。
書かれている「~と考えているのですがどうでしょうか」的な事は私から見ると全て?「その通り」と返事します、、、多少古いですが返事を、、、飲酒率90% 記憶やや低下率60% 著しく定価30% です:cool:
少し羨ましいですね、身近にはもちろんネット上でも私たち?素人は教わる相手や状況を得難い事が常と考えていたのですが、では又何かの時に。(私が教えてもらったりして)

オフライン

 

#217 2009-12-10 23:18:05

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#218 2009-12-10 23:44:49

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさんこんばんは! 20分くらいかけて見比べていますが もう ダメです。明日は早朝出勤なので お休みします。
こんなに 長くなったのでもう一度張り付けても いいですよね??

下記です
#! /bin/sh -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
    # We can't cope with devices loop-mounted from files here.
    case ${GRUB_DEVICE} in
      /dev/*) ;;
      *) exit 0 ;;
    esac
  ;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
    || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

# add crashkernel option if we have the required tools
if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
    GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
fi

linux_entry ()
{
  cat << EOF
menuentry "$1" {
        recordfail=1
#Deleted by Kaznon
EOF
  if [ "x$3" = "xquiet" ]; then
    cat << EOF
    set quiet=1
EOF
  fi
  save_default_entry | sed -e "s/^/\t/"
  prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
  cat << EOF
    linux    ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2
EOF
  if test -n "${initrd}" ; then
    cat << EOF
    initrd    ${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}

list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`

while [ "x$list" != "x" ] ; do
  linux=`version_find_latest $list`
  echo "Found linux image: $linux" >&2
  basename=`basename $linux`
  dirname=`dirname $linux`
  rel_dirname=`make_system_path_relative_to_its_root $dirname`
  version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
  alt_version=`echo $version | sed -e "s,\.old$,,g"`
  linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"

  initrd=
  for i in "initrd.img-${version}" "initrd-${version}.img" \
       "initrd-${version}" "initrd.img-${alt_version}" \
       "initrd-${alt_version}.img" "initrd-${alt_version}"; do
    if test -e "${dirname}/${i}" ; then
      initrd="$i"
      break
    fi
  done
  if test -n "${initrd}" ; then
    echo "Found initrd image: ${dirname}/${initrd}" >&2
  else
    # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
    linux_root_device_thisversion=${GRUB_DEVICE}
  fi

  linux_entry "${OS}, Linux ${version}" \
      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
      quiet
  if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
    linux_entry "${OS}, Linux ${version} (recovery mode)" \
    "single ${GRUB_CMDLINE_LINUX}"
  fi

  list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
done

オフライン

 

#219 2009-12-10 23:51:57

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

今回も前回も
端末にエラーが出てます。
下記です。(関係ないとは思いますが)
~$ gedit /etc/grub.d/10_linux
/home/kzhr/.themes/aero-clone/gtk-2.0/toolbar-custom.rc:21: pixmap_path に画像ファイルが見つかりません: "Toolbar/toolbar-black.png"
/home/kzhr/.themes/aero-clone/gtk-2.0/toolbar-custom.rc:24: Background image options specified without filename
/home/kzhr/.themes/aero-clone/gtk-2.0/gtkrc:187: pixmap_path に画像ファイルが見つかりません: "Arrows/arrow-up.png"
/home/kzhr/.themes/aero-clone/gtk-2.0/gtkrc:191: Overlay image options specified without filename
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkStatusbar::shadow-type' of type `GtkShadowType' from rc file value "((GString*) 0x9637270)" of type `GString'
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkStatusbar::shadow-type' of type `GtkShadowType' from rc file value "((GString*) 0x9637270)" of type `GString'

オフライン

 

#220 2009-12-10 23:54:45

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#221 2009-12-10 23:58:21

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

#222 2009-12-11 00:01:34

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

kiyoshiさん 申し訳ありません
おやすみなさい。
GRUB2は いまのままで 何もしなくてよろしいのでしょうか? 
kiyoshiさんの言われた「ちょっとまずそうなことがあります。」は?気にしなくてよろしいでしょうか?
 お気分とりなおせたら 明日にでもお返事 お待ちしております。
おやすみなさい

オフライン

 

#223 2009-12-11 00:03:30

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

そうかも 知れません アップデートを 何回かしましたし 今もアップデートを するように アップデートマネージャーが立ち上がります。

オフライン

 

#224 2009-12-11 18:57:43

kaznon
メンバ
登録日: 2008-09-25

Re: USB-HDD 9.10 GURB GURB2

hir0さん から 投稿いただいておりました。 本当にいつもありがとうございます。

hir0さん による投稿:

身近にはもちろんネット上でも私たち?素人は教わる相手や状況を得難い事が常と考えていたのですが、では又何かの時に。(私が教えてもらったりして)

()内の発言以外は 同感です。
私は、初めて参加したのがUBUNTUフォーラムで、他のフォーラムには登録しておりません。ここしか知らないですけど・・・とても暖かい場所だと思っております。 これからもよろしくお願いします。
()内の発言は、地球がひっくり返っても 絶対にありえません!
登録日をみたら 私のほうが3日も先輩なのに・・・レベルの上昇度は、hir0さんの方が 100倍うえです。
何事も基礎(プログラム言語等)されている人の方が、早く上達しますよね!?と言い訳です。

内緒の話なのですが・・最近 kiyoshiさんからの
(もうお分かりですよね?)が プレッシャーに感じてしまう事がありますので、これは ひとえに私の勉強不足からくるもので 最近は
kiyoshiさんに 失礼の 無い様に このスレッドを 時間がある時に 最初から ゆっくり ゆっくり 読み直しているところです。
(また kiyoshiさんに怒られるかも??)

読み直していたら 又 機会がありましたら 投稿いただいてました「grub2の起動用USBメモリやgrub2の起動用FDディスク」について質問をさせていただきたく思っております。
これからも よろしくお願いします。

オフライン

 

#225 2009-12-12 04:58:38

kiyoshi
拒否
From: Linux-Loving-Person
登録日: 2007-02-07

Re: USB-HDD 9.10 GURB GURB2

※規約違反により追放されたユーザの投稿は、ログインユーザにのみ表示されます。

オフライン

 

Board footer

Powered by FluxBB